From c346b535e92ad1ad996835a7dc21be43f8ca24d1 Mon Sep 17 00:00:00 2001 From: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Wed, 16 Feb 2022 10:00:15 +0000 Subject: Fixed battery bug in LTS (#218) Remove all batteries from players at the end of a round for round-based modes --- Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut index 5d27a17e..85cc0de5 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut @@ -666,7 +666,7 @@ void function CleanUpEntitiesForRoundEnd() foreach ( entity player in GetPlayerArray() ) { ClearTitanAvailable( player ) - + player.SetPlayerNetInt( "batteryCount", 0 ) if ( IsAlive( player ) ) player.Die( svGlobal.worldspawn, svGlobal.worldspawn, { damageSourceId = eDamageSourceId.round_end } ) } @@ -675,7 +675,6 @@ void function CleanUpEntitiesForRoundEnd() { if ( !IsValid( npc ) ) continue - // kill rather than destroy, as destroying will cause issues with children which is an issue especially for dropships and titans npc.Die( svGlobal.worldspawn, svGlobal.worldspawn, { damageSourceId = eDamageSourceId.round_end } ) } @@ -854,4 +853,4 @@ float function GetTimeLimit_ForGameMode() // default to 10 mins, because that seems reasonable return GetCurrentPlaylistVarFloat( playlistString, 10 ) -} \ No newline at end of file +} -- cgit v1.2.3