summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-12-05 18:01:42 -0800
committerVito Caputo <vcaputo@pengaru.com>2022-12-05 18:27:22 -0800
commit1d8f30eb26a13c5be62526e201948aaa16caf236 (patch)
tree0dbbe06c57d8368fffe4e260be2058c6d3437bcf /src/game.c
parentf8c50c92441ac82d8f1c38f57b9fa0b56f4bb432 (diff)
sfx,game: introduce adult_unmasked.wav sound effect
This plays whenever the adult runs out of masks
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game.c b/src/game.c
index 2ecff27..5dadc91 100644
--- a/src/game.c
+++ b/src/game.c
@@ -655,8 +655,10 @@ static ix2_search_status_t virus_search(void *cb_context, ix2_object_t *ix2_obje
if (entity->adult.masked) {
reset_virus(search->virus);
- if (!--entity->adult.masked)
- (void) adult_node_new(&(stage_conf_t){ .stage = search->game->adult->entity.node, .replace = 1, .name = "adult-masked", .active = 1, .alpha = 1.f }, &search->game->sars->projection_x, &search->game->adult->entity.model_x);
+ if (!--entity->adult.masked) {
+ (void) adult_node_new(&(stage_conf_t){ .stage = search->game->adult->entity.node, .replace = 1, .name = "adult-unmasked", .active = 1, .alpha = 1.f }, &search->game->sars->projection_x, &search->game->adult->entity.model_x);
+ sfx_play(sfx.adult_unmasked);
+ }
(void) flash_entity(search->game, &entity->any, 4);
@@ -847,9 +849,10 @@ static ix2_search_status_t adult_search(void *cb_context, ix2_object_t *ix2_obje
return IX2_SEARCH_MORE_MISS;
if (game->adult->masked) {
- if (!--game->adult->masked)
- (void) adult_node_new(&(stage_conf_t){ .stage = game->adult->entity.node, .replace = 1, .name = "adult-masked", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &game->adult->entity.model_x);
- flash_entity(game, &game->adult->entity, 4);
+ if (!--game->adult->masked) {
+ (void) adult_node_new(&(stage_conf_t){ .stage = game->adult->entity.node, .replace = 1, .name = "adult-unmasked", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &game->adult->entity.model_x);
+ sfx_play(sfx.adult_unmasked);
+ }
(void) flash_entity(game, &game->adult->entity, 4);
reset_virus(&entity->virus);
© All Rights Reserved