aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/scripts/vscripts/mp
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/mp')
-rw-r--r--Northstar.CustomServers/scripts/vscripts/mp/_base_gametype_mp.gnut17
-rw-r--r--Northstar.CustomServers/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut13
-rw-r--r--Northstar.CustomServers/scripts/vscripts/mp/_gamestate_mp.nut4
3 files changed, 26 insertions, 8 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/mp/_base_gametype_mp.gnut b/Northstar.CustomServers/scripts/vscripts/mp/_base_gametype_mp.gnut
index 9d2ccc91..9274854a 100644
--- a/Northstar.CustomServers/scripts/vscripts/mp/_base_gametype_mp.gnut
+++ b/Northstar.CustomServers/scripts/vscripts/mp/_base_gametype_mp.gnut
@@ -339,8 +339,7 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga
if ( "respawnTime" in attacker.s )
respawnTime = Time() - expect float ( attacker.s.respawnTime )
- thread PlayerWatchesKillReplay( player, attacker.GetEncodedEHandle(), attacker.GetIndexForEntity(), respawnTime, timeOfDeath, beforeTime, replayTracker )
- thread EndReplayOnTime( player, replayLength )
+ thread PlayerWatchesKillReplayWrapper( player, attacker, respawnTime, timeOfDeath, beforeTime, replayTracker )
}
player.SetPlayerSettings( "spectator" ) // prevent a crash with going from titan => pilot on respawn
@@ -356,10 +355,10 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga
SetRespawnAvailable( player )
wait respawnDelay
+
+ player.WaitSignal( "RespawnMe" ) // set in base_gametype: ClientCommand_RespawnPlayer
player.SetPredictionEnabled( true )
-
- player.WaitSignal( "RespawnMe" ) // set in base_gametype: ClientCommand_RespawnPlayer
ClearRespawnAvailable( player ) // need so the respawn icon doesn't show for like a frame on next death
if ( ( expect bool( player.GetPersistentVar( "spawnAsTitan" ) ) && IsTitanAvailable( player ) ) || ( Riff_SpawnAsTitan() > 0 && Riff_ShouldSpawnAsTitan( player ) ) ) // spawn as titan
@@ -373,6 +372,14 @@ void function PostDeathThread_MP( entity player, var damageInfo ) // based on ga
}
}
+void function PlayerWatchesKillReplayWrapper( entity player, entity attacker, float timeSinceAttackerSpawned, float timeOfDeath, float beforeTime, table replayTracker )
+{
+ PlayerWatchesKillReplay( player, attacker.GetEncodedEHandle(), attacker.GetIndexForEntity(), timeSinceAttackerSpawned, timeOfDeath, beforeTime, replayTracker )
+ player.ClearReplayDelay()
+ player.ClearViewEntity()
+ player.SetPredictionEnabled( true )
+}
+
void function EndReplayOnTime( entity player, float replayLength )
{
player.EndSignal( "RespawnMe" )
@@ -381,6 +388,8 @@ void function EndReplayOnTime( entity player, float replayLength )
wait replayLength
if ( IsValid( player ) && KillcamsEnabled() )
{
+ print( "fucking how" )
+
player.ClearReplayDelay()
player.ClearViewEntity()
player.SetPredictionEnabled( true )
diff --git a/Northstar.CustomServers/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut b/Northstar.CustomServers/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut
index 7d5fb9f0..02c312be 100644
--- a/Northstar.CustomServers/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut
+++ b/Northstar.CustomServers/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut
@@ -72,9 +72,6 @@ void function DropshipIntro_OnClientConnected( entity player )
return
}
-
- // if we're at this point, we have more players than we do dropships, oh dear
- RespawnAsPilot( player )
}
void function DropshipIntro_OnClientDisconnected( entity player )
@@ -159,6 +156,16 @@ void function SpawnPlayerIntoDropship( entity player )
break
}
+
+ if ( playerDropship.dropship == null )
+ {
+ // if we're at this point, we have more players than we do dropships, oh dear
+ ScreenFadeFromBlack( player, 0.0 )
+ RespawnAsPilot( player )
+
+ file.numPlayersInIntro--
+ return
+ }
// figure out what anims we're using for idle
string idleAnim = DROPSHIP_IDLE_ANIMS[ playerDropshipIndex ]
diff --git a/Northstar.CustomServers/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/scripts/vscripts/mp/_gamestate_mp.nut
index bbeb72fb..96a61b69 100644
--- a/Northstar.CustomServers/scripts/vscripts/mp/_gamestate_mp.nut
+++ b/Northstar.CustomServers/scripts/vscripts/mp/_gamestate_mp.nut
@@ -51,7 +51,7 @@ struct {
void function PIN_GameStart()
{
- // todo: using the pin telemetry function here is weird and was done veeery early on before i knew how this all worked, should use a different one
+ // todo: using the pin telemetry function here, weird and was done veeery early on before i knew how this all worked, should use a different one
// called from InitGameState
//FlagInit( "ReadyToStartMatch" )
@@ -596,6 +596,8 @@ void function CleanUpEntitiesForRoundEnd()
foreach ( entity player in GetPlayerArray() )
{
+ ClearTitanAvailable( player )
+
if ( IsAlive( player ) )
player.Die()