diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut index b169de632..feca3bd52 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_base_gametype_mp.gnut @@ -318,11 +318,11 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga else player.SetObserverTarget( null ) - if ( !file.playerDeathsHidden ) - { + if ( ( GamePlayingOrSuddenDeath() || GetGameState() == eGameState.Epilogue ) && !file.playerDeathsHidden ) player.AddToPlayerGameStat( PGS_DEATHS, 1 ) + + if ( !file.playerDeathsHidden ) Remote_CallFunction_NonReplay( player, "ServerCallback_YouDied", attacker.GetEncodedEHandle(), GetHealthFrac( attacker ), methodOfDeath ) - } float deathcamLength = GetDeathCamLength( player ) wait deathcamLength @@ -460,6 +460,7 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) camera.Fire( "Enable", "!activator", 0, player ) player.EndSignal( "OnDestroy" ) + titan.EndSignal( "OnDestroy" ) OnThreadEnd( function() : ( player, titan, camera ) { if ( IsValid( player ) ) @@ -468,7 +469,11 @@ void function RespawnAsTitan( entity player, bool manualPosition = false ) player.isSpawning = false } - titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete + if ( IsValid( titan ) ) + titan.Destroy() // pilotbecomestitan leaves an npc titan that we need to delete + else + RespawnAsPilot( player ) // this is 100% an edgecase, just avoid softlocking if we ever hit it in playable gamestates + camera.Fire( "Disable", "!activator", 0, player ) camera.Destroy() }) |