aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-30 02:17:41 +0000
committerGitHub <noreply@github.com>2021-12-30 02:17:41 +0000
commit5fb2346bb8751e4536a2635c5de82240f870e83b (patch)
treeba9f7a37251d4be82fe1150dfe5d2e4414eb50c4 /Northstar.CustomServers/mod/scripts/vscripts
parent38b3a6efddbe19af38b4d75406f4794d3f8b2c7f (diff)
parenta109a2d376f61fb92bf9bedffe67713316bcdfae (diff)
downloadNorthstarMods-5fb2346bb8751e4536a2635c5de82240f870e83b.tar.gz
NorthstarMods-5fb2346bb8751e4536a2635c5de82240f870e83b.zip
Merge pull request #32 from Soup-64/patch-1
Fix missing respawn grace during EvacEpilogue and Postmatch gamestate
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut15
1 files changed, 12 insertions, 3 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut
index a4f23b85..b861ed9f 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut
@@ -103,11 +103,20 @@ void function EvacEpilogue()
if ( canRunEvac )
{
- SetRespawnsEnabled( false )
+ thread SetRespawnAndWait( false )
thread Evac( GetOtherTeam( winner ), EVAC_INITIAL_WAIT, EVAC_ARRIVAL_TIME, EVAC_WAIT_TIME, EvacEpiloguePlayerCanBoard, EvacEpilogueShouldLeaveEarly, EvacEpilogueCompleted )
}
else
- thread EvacEpilogueCompleted( null ) // this is hacky but like, this also shouldn't really be hit in normal gameplay
+ {
+ thread SetRespawnAndWait( false ) //prevent respawns during the fade to black, should only be an issue if the match is a draw
+ thread EvacEpilogueCompleted( null ) //this is hacky but like, this also shouldn't really be hit in normal gameplay
+ }
+}
+
+void function SetRespawnAndWait(bool mode)
+{
+ wait GAME_EPILOGUE_PLAYER_RESPAWN_LEEWAY
+ SetRespawnsEnabled( mode )
}
bool function EvacEpiloguePlayerCanBoard( entity dropship, entity player )
@@ -386,4 +395,4 @@ void function EvacDropshipKilled( entity dropship, var damageInfo )
player.Die( DamageInfo_GetAttacker( damageInfo ), DamageInfo_GetWeapon( damageInfo ), { damageSourceId = eDamageSourceId.evac_dropship_explosion, scriptType = DF_GIB } )
}
}
-} \ No newline at end of file
+}