Skip to content

Commit

Permalink
don't count spectators and summons towards active units
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterVdc committed Oct 16, 2024
1 parent c5d037c commit 037165e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/thing_creature.c
Original file line number Diff line number Diff line change
Expand Up @@ -4003,7 +4003,10 @@ void recalculate_player_creature_digger_lists(PlayerNumber plr_idx)
struct CreatureControl* cctrl = creature_control_get_from_thing(creatng);
cctrl->players_next_creature_idx = 0;
cctrl->players_prev_creature_idx = previous_digger;
dungeon->num_active_diggers++;
if (!flag_is_set(cctrl->flgfield_2,TF2_Spectator) && !(flag_is_set(cctrl->flgfield_2, TF2_SummonedCreature)))
{
dungeon->num_active_diggers++;
}
previous_digger = i;
}
else
Expand All @@ -4021,7 +4024,10 @@ void recalculate_player_creature_digger_lists(PlayerNumber plr_idx)
struct CreatureControl* cctrl = creature_control_get_from_thing(creatng);
cctrl->players_next_creature_idx = 0;
cctrl->players_prev_creature_idx = previous_creature;
dungeon->num_active_creatrs++;
if (!flag_is_set(cctrl->flgfield_2,TF2_Spectator) && !(flag_is_set(cctrl->flgfield_2, TF2_SummonedCreature)))
{
dungeon->num_active_creatrs++;
}
previous_creature = i;
}
}
Expand Down

0 comments on commit 037165e

Please sign in to comment.