aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers
diff options
context:
space:
mode:
authorRoyalBlue1 <realEmail@veryRealURL.com>2022-11-13 16:52:46 +0100
committerRoyalBlue1 <realEmail@veryRealURL.com>2022-11-13 16:52:46 +0100
commit95f09ef4ac2e9ab26ba55663ccc6366aee9febe0 (patch)
tree7b67cc2b724ba36fc37c940f5db4c6d655ff70de /Northstar.CustomServers
parent3e83c53b44ea0cd04fa6cfcd645ca4569e19e808 (diff)
downloadNorthstarMods-95f09ef4ac2e9ab26ba55663ccc6366aee9febe0.tar.gz
NorthstarMods-95f09ef4ac2e9ab26ba55663ccc6366aee9febe0.zip
Prevent crash when playing with more than 4 players
end game will now only show 4 awards even if more players are in the game
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut3
1 files changed, 3 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
index 4af82c8ba..679cda7c3 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_fd.nut
@@ -934,8 +934,11 @@ void function FD_Epilogue_threaded()
foreach( entity player in GetPlayerArray() )
{
+ int i = 0
foreach( entity medalPlayer, string ref in awardResults )
{
+ if(i++ >= 4)
+ break;
Remote_CallFunction_NonReplay( player, "ServerCallback_UpdateGameStats", medalPlayer.GetEncodedEHandle(), GetFDStatData( ref ).index , awardResultValues[medalPlayer], GetPersistentSpawnLoadoutIndex( medalPlayer, "titan" ) )
}
Remote_CallFunction_NonReplay( player, "ServerCallback_ShowGameStats", Time() + 25 )//TODO set correct endTime