diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-05 16:03:50 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-05 16:03:50 +0000 |
commit | 51e16034230f4dd759900c7922b8db43941e0a70 (patch) | |
tree | 6492337f6855e2403db0376b8d1021196df80879 /Northstar.CustomServers/mod/scripts/vscripts/evac | |
parent | b48fd143624f2b887699acd98d9a4c55b792ab0e (diff) | |
download | NorthstarMods-51e16034230f4dd759900c7922b8db43941e0a70.tar.gz NorthstarMods-51e16034230f4dd759900c7922b8db43941e0a70.zip |
big commit for playtesting
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/evac')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut index 712fa9de..d84ab873 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut @@ -67,6 +67,7 @@ struct { void function Evac_Init() { EvacShared_Init() + RegisterSignal( "EvacShipLeaves" ) } void function AddEvacNode( entity evacNode ) @@ -95,7 +96,7 @@ void function EvacEpilogue() { // make sure we don't run this on ffa modes if no epilogue was specified, since evac is default epilogue if ( GetCurrentPlaylistVarInt( "max_teams", 2 ) == 2 ) - thread Evac( GetPlayerArray()[0].GetTeam(), EVAC_INITIAL_WAIT, EVAC_ARRIVAL_TIME, EVAC_WAIT_TIME, EvacEpiloguePlayerCanBoard, EvacEpilogueShouldLeaveEarly, EvacEpilogueCompleted ) + thread Evac( GetOtherTeam( GetWinningTeam() ), 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 } @@ -146,12 +147,12 @@ void function EvacEpilogueCompleted( entity dropship ) } // global evac func, anything can call this, it's not necessarily an epilogue thing -void function Evac( int evacTeam, float initialWait, float arrivalTime, float waitTime, bool functionref( entity, entity ) canBoardCallback, bool functionref( entity ) shouldLeaveEarlyCallback, void functionref( entity ) completionCallback ) +void function Evac( int evacTeam, float initialWait, float arrivalTime, float waitTime, bool functionref( entity, entity ) canBoardCallback, bool functionref( entity ) shouldLeaveEarlyCallback, void functionref( entity ) completionCallback, entity customEvacNode = null ) { wait initialWait // setup evac nodes if not manually registered - if ( file.evacNodes.len() == 0 ) + if ( file.evacNodes.len() == 0 && !IsValid( customEvacNode ) ) { for ( int i = 1; ; i++ ) { @@ -167,7 +168,9 @@ void function Evac( int evacTeam, float initialWait, float arrivalTime, float wa if ( !IsValid( file.spaceNode ) ) file.spaceNode = GetEnt( "spaceNode" ) - entity evacNode = file.evacNodes.getrandom() + entity evacNode + if ( !IsValid( customEvacNode ) ) + evacNode = file.evacNodes.getrandom() // setup client evac position file.evacIcon = CreateEntity( "info_target" ) @@ -261,6 +264,7 @@ void function Evac( int evacTeam, float initialWait, float arrivalTime, float wa player.HolsterWeapon() // fly away + dropship.Signal( "EvacShipLeaves" ) thread PlayAnim( dropship, "cd_dropship_rescue_side_end", evacNode ) SetTeamActiveObjective( evacTeam, "EG_DropshipExtractDropshipFlyingAway" ) |