Skip to content

Commit

Permalink
Use WinnerDetermined instead of Epilogue to grant stats (#713)
Browse files Browse the repository at this point in the history
Use `WinnerDetermined` instead of `Epilogue` to grant stats as some modes (like LTS) don't go into `eGameState.Epilogue` apparently.
`eGameState.WinnerDetermined` should be better
  • Loading branch information
ASpoonPlaysGames authored Sep 18, 2023
1 parent afdadc6 commit a2c0d6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void function Stats_Init()
AddCallback_OnPlayerRespawned( OnPlayerRespawned )
AddCallback_OnClientConnected( OnClientConnected )
AddCallback_OnClientDisconnected( OnClientDisconnected )
AddCallback_GameStateEnter( eGameState.Epilogue, OnEpilogueStarted )
AddCallback_GameStateEnter( eGameState.WinnerDetermined, OnWinnerDetermined )

thread HandleDistanceAndTimeStats_Threaded()
thread SaveStatsPeriodically_Threaded()
Expand Down Expand Up @@ -798,7 +798,7 @@ void function OnPlayerRespawned( entity player )
thread SetLastPosForDistanceStatValid_Threaded( player, true )
}

void function OnEpilogueStarted()
void function OnWinnerDetermined()
{
// award players for match completed, wins, and losses
foreach ( entity player in GetPlayerArray() )
Expand Down

0 comments on commit a2c0d6c

Please sign in to comment.