Skip to content

Commit

Permalink
Prevent progress updates when a Tank is in play to optimize game info…
Browse files Browse the repository at this point in the history
… synchronization
  • Loading branch information
altair-sossai committed Nov 15, 2024
1 parent 3d790e3 commit faaccbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Binary file modified addons/sourcemod/plugins/optional/l4d2_gameinfo_sync.smx
Binary file not shown.
9 changes: 6 additions & 3 deletions addons/sourcemod/scripting/l4d2_gameinfo_sync.sp
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@ void SendPlayers()
player.SetBool("blackAndWhite", L4D_IsPlayerOnThirdStrike(client));
player.SetBool("incapacitated", IsIncapacitated(client));

float progress = GetSurvivorProgress(client);
if (progress > g_fSurvivorProgress[client])
g_fSurvivorProgress[client] = progress;
if (!IsTankInPlay())
{
float progress = GetSurvivorProgress(client);
if (progress > g_fSurvivorProgress[client])
g_fSurvivorProgress[client] = progress;
}
}

player.SetBool("isPlayerAlive", isPlayerAlive);
Expand Down

0 comments on commit faaccbd

Please sign in to comment.