summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index 9dac370..1cf67f2 100644
--- a/src/game.c
+++ b/src/game.c
@@ -396,6 +396,15 @@ static void flash_entity(game_t *game, entity_any_t *any, unsigned count)
static void more_teepee(game_t *game, teepee_t *teepee)
{
+
+ if (game->adult->holding) {
+ /* disallow picking up teepee if holding something, flash what's held and the teepee we missed */
+ flash_entity(game, &teepee->entity, 5);
+ flash_entity(game, &game->adult->holding->any, 5);
+
+ return;
+ }
+
for (unsigned i = 0; i < teepee->quantity; i++) {
teepee_icon_t *tp;
@@ -607,6 +616,8 @@ static ix2_search_status_t virus_search(void *cb_context, ix2_object_t *ix2_obje
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);
+ flash_entity(search->game, &entity->any, 4);
+
return IX2_SEARCH_STOP_MISS;
}
@@ -797,6 +808,7 @@ static ix2_search_status_t adult_search(void *cb_context, ix2_object_t *ix2_obje
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);
reset_virus(&entity->virus);
return IX2_SEARCH_MORE_MISS;
@@ -880,7 +892,7 @@ static void game_move_adult(game_t *game, v2f_t *dir)
game->adult->holding->any.position.x = randf();
game->adult->holding->any.position.y = randf();
entity_update_x(game, &game->adult->holding->any);
-
+ game->adult->holding->any.flashes_remaining = 0;
game->adult->holding = NULL;
game->adult->rescues++;
}
© All Rights Reserved