Skip to content

Commit

Permalink
Update gungame.sma
Browse files Browse the repository at this point in the history
Same as previous update. Finish bug fixing ent.
  • Loading branch information
djearthquake authored Nov 4, 2024
1 parent e079916 commit 658a6d9
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions scripting/czero/gungame.sma
Original file line number Diff line number Diff line change
Expand Up @@ -986,12 +986,6 @@ public event_new_round()

if(!ggActive) return;

new iEnt = fm_find_ent_by_class(MaxClients, "game_player_equip")
if(pev_valid(iEnt))
{
fm_remove_entity(iEnt)
log_amx("Removed ent to play Gungame.")
}
// we should probably warmup...
// don't ask me where I'm getting this from.
if(shouldWarmup)
Expand Down Expand Up @@ -3815,7 +3809,6 @@ public toggle_gungame(taskid)

remove_task(TASK_WARMUP_CHECK);
}

// we need to get these stats (GunGame is on, we don't have them, and we aren't in the process of getting them)
#if defined SQL
if(ggActive && !task_exists(TASK_GET_TOP_PLAYERS)) stats_get_top_players(); // there is no statsArray for SQL
Expand Down Expand Up @@ -6892,6 +6885,16 @@ public autovote_result()
}
else if(ggActive) vSuccess = 1;

if(vSuccess)
{
new iEnt = fm_find_ent_by_class(MaxClients, "game_player_equip")
if(pev_valid(iEnt))
{
fm_remove_entity(iEnt)
log_amx("Removed ent to play Gungame.")
}
}

if(vSuccess && !ggActive)
{
restart_round(5);
Expand Down

0 comments on commit 658a6d9

Please sign in to comment.