diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-27 06:52:59 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-01-27 06:52:59 +0000 |
commit | 5e5a249cce1221db032f610057ab986443477d62 (patch) | |
tree | 54ae105ab92d610cc30cb2fc044ea829b061d5a2 /Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut | |
parent | 3e98aad76ce9f69eba30770e71518a715991e820 (diff) | |
download | NorthstarMods-5e5a249cce1221db032f610057ab986443477d62.tar.gz NorthstarMods-5e5a249cce1221db032f610057ab986443477d62.zip |
titan cleanup stability improvements
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut index ddf8cd8d2..13f0f75f0 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut @@ -670,14 +670,16 @@ void function CleanUpEntitiesForRoundEnd() if ( IsAlive( player ) ) player.Die( svGlobal.worldspawn, svGlobal.worldspawn, { damageSourceId = eDamageSourceId.round_end } ) - - if ( IsAlive( player.GetPetTitan() ) ) - player.GetPetTitan().Destroy() } foreach ( entity npc in GetNPCArray() ) - if ( IsValid( npc ) ) - npc.Destroy() // need this because getnpcarray includes the pettitans we just killed at this point + { + 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 } ) + } // destroy weapons ClearDroppedWeapons() |