diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-15 17:58:33 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-15 17:58:33 +0000 |
commit | 06924c215dcf8d4dd425cbbf178509bc222c2f7d (patch) | |
tree | 36db62761142f7a3430a5be26a335168d2da8d65 /Northstar.CustomServers/mod/scripts/vscripts/evac | |
parent | 1b6e5af70bf442c684b891003e516329b190c130 (diff) | |
download | NorthstarMods-06924c215dcf8d4dd425cbbf178509bc222c2f7d.tar.gz NorthstarMods-06924c215dcf8d4dd425cbbf178509bc222c2f7d.zip |
more playtest fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/evac')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut index 9a7e89e2..96b84c23 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut @@ -96,8 +96,12 @@ void function EvacEpilogue() { int winner = GetWinningTeam() - // make sure we don't run this on ffa modes if no epilogue was specified or it won't work for current gamestate, since evac is default epilogue - if ( GetCurrentPlaylistVarInt( "max_teams", 2 ) == 2 && ( winner == TEAM_MILITIA || winner == TEAM_IMC ) ) + // make sure we don't run evac if it won't be supported for current map/gamestate + bool canRunEvac = GetCurrentPlaylistVarInt( "max_teams", 2 ) == 2 && + ( winner == TEAM_MILITIA || winner == TEAM_IMC ) && + ( file.evacNodes.len() > 0 || IsValid( GetEnt( "escape_node1" ) ) ) // code assumes escape_node1 should be first node if automatically registering + + if ( canRunEvac ) 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 @@ -125,7 +129,7 @@ bool function EvacEpilogueShouldLeaveEarly( entity dropship ) if ( IsValid( player ) ) numEvacing++ - return GetPlayerArrayOfTeam( dropship.GetTeam() ).len() == numEvacing || numEvacing == dropship.s.evacSlots.len() + return GetPlayerArrayOfTeam_Alive( dropship.GetTeam() ).len() == numEvacing || numEvacing == dropship.s.evacSlots.len() } void function EvacEpilogueCompleted( entity dropship ) @@ -283,8 +287,11 @@ void function Evac( int evacTeam, float initialWait, float arrivalTime, float wa wait WARPINFXTIME // go to space + // hardcoded angles here are a hack, spacenode position doesn't face the planet in the skybox, for some reason - file.spaceNode.SetAngles( < 30, -75, 20 >) + // nvm removing for now + //file.spaceNode.SetAngles( < 30, -75, 20 > ) + dropship.SetOrigin( file.spaceNode.GetOrigin() ) dropship.SetAngles( file.spaceNode.GetAngles() ) dropship.SetInvulnerable() |