Skip to content

Commit

Permalink
Remove health bar when no more bosses [M]
Browse files Browse the repository at this point in the history
  • Loading branch information
Batfoxkid committed Nov 25, 2023
1 parent fe7eb83 commit e4a21f1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions addons/sourcemod/scripting/freak_fortress_2/gamemode.sp
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,19 @@ void Gamemode_UpdateHUD(int team, bool healing = false, bool nobar = false)
}
else if(lastCount < 3)
{
// int entity = FindEntityByClassname(-1, "monster_resource");
// if(entity != -1)
// RemoveEntity(entity);
int entity = MaxClients + 1;
while((entity = FindEntityByClassname(entity, "eyeball_boss")) != -1)
{
if(GetEntProp(entity, Prop_Send, "m_iTeamNum") > TFTeam_Blue)
break;
}

if(entity == -1)
{
entity = FindEntityByClassname(-1, "monster_resource");
if(entity != -1)
SetEntProp(entity, Prop_Send, "m_iBossHealthPercentageByte", 0, 2);
}
}

if(HudTimer[team])
Expand Down

0 comments on commit e4a21f1

Please sign in to comment.