Skip to content

Commit

Permalink
Health Flower shows up again for allies (#3672)
Browse files Browse the repository at this point in the history
  • Loading branch information
walt253 authored Nov 14, 2024
1 parent 5c2b851 commit 697e6f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/engine_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -5374,13 +5374,13 @@ void draw_status_sprites(long scrpos_x, long scrpos_y, struct Thing *thing)
TbBool is_enemy_and_visible = players_are_enemies(player->id_number, thing->owner) && !creature_is_invisible(thing);
// Check if the creature belongs to the player, is hurt but not unconscious.
TbBool is_owned_and_hurt = false;
// Check if the creature belongs to an ally and is hurt.
TbBool is_allied_and_hurt = false;
// Check if the creature belongs to an ally.
TbBool is_allied = false;
TbBool should_drag_to_lair = false;
if (!is_enemy_and_visible)
{
is_owned_and_hurt = (player->id_number == thing->owner) && creature_would_benefit_from_healing(thing) && !creature_is_being_unconscious(thing);
is_allied_and_hurt = (player->id_number != thing->owner) && creature_would_benefit_from_healing(thing) && players_are_mutual_allies(player->id_number, thing->owner);
is_owned_and_hurt = creature_would_benefit_from_healing(thing) && !creature_is_being_unconscious(thing) && (player->id_number == thing->owner);
is_allied = players_are_mutual_allies(player->id_number, thing->owner) && (player->id_number != thing->owner);
should_drag_to_lair = creature_is_being_unconscious(thing) && (player->id_number == thing->owner)
// Check if the creature has a lair room or can heal in a lair.
&& ((game.conf.rules.workers.drag_to_lair == 1 && !room_is_invalid(get_creature_lair_room(thing)))
Expand All @@ -5396,7 +5396,7 @@ void draw_status_sprites(long scrpos_x, long scrpos_y, struct Thing *thing)
if ((is_thing_under_hand)
|| (is_enemy_and_visible)
|| (is_owned_and_hurt)
|| (is_allied_and_hurt)
|| (is_allied)
|| (thing->owner == PLAYER_NEUTRAL)
// If drag_to_lair rule is active.
|| (should_drag_to_lair)
Expand Down

0 comments on commit 697e6f1

Please sign in to comment.