Skip to content

Commit

Permalink
Fix boolean setting for team flip and normalize survivor progress per…
Browse files Browse the repository at this point in the history
…centage for accurate game info synchronization
  • Loading branch information
altair-sossai committed Nov 9, 2024
1 parent 0a63911 commit e5b6777
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified addons/sourcemod/plugins/optional/l4d2_gameinfo_sync.smx
Binary file not shown.
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/l4d2_gameinfo_sync.sp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void SendRound()
g_iTankPercent = GetStoredTankPercent();
g_iWitchPercent = GetStoredWitchPercent();

command.SetInt("areTeamsFlipped", GameRules_GetProp("m_bAreTeamsFlipped"));
command.SetBool("areTeamsFlipped", GameRules_GetProp("m_bAreTeamsFlipped") ? true : false);
command.SetInt("maxChapterProgressPoints", L4D_GetVersusMaxCompletionScore());
command.SetFloat("tankPercent", g_iTankPercent / 100.0);
command.SetFloat("witchPercent", g_iWitchPercent / 100.0);
Expand Down Expand Up @@ -284,7 +284,7 @@ void SendPlayers()
}

player.SetBool("isPlayerAlive", isPlayerAlive);
player.SetFloat("progress", g_fSurvivorProgress[client]);
player.SetFloat("progress", g_fSurvivorProgress[client] / 100.0);

survivors.Push(player);
}
Expand Down

0 comments on commit e5b6777

Please sign in to comment.