diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-26 23:22:52 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-26 23:22:52 +0000 |
commit | 5a1e4e60513b4a804ca343080b3d2c752a4b2a4d (patch) | |
tree | 6e1299c30b14e8e2b14ba7b5ff3fa17a2ec23602 /Northstar.CustomServers | |
parent | 97f17ec3d74787cfdee851bb961f76de90fd60a9 (diff) | |
download | NorthstarMods-5a1e4e60513b4a804ca343080b3d2c752a4b2a4d.tar.gz NorthstarMods-5a1e4e60513b4a804ca343080b3d2c752a4b2a4d.zip |
add ns_private_match_countdown_length and fix flyout and evac issue
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r-- | Northstar.CustomServers/mod.json | 5 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut | 14 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut | 6 |
3 files changed, 22 insertions, 3 deletions
diff --git a/Northstar.CustomServers/mod.json b/Northstar.CustomServers/mod.json index 99826241..65aa7190 100644 --- a/Northstar.CustomServers/mod.json +++ b/Northstar.CustomServers/mod.json @@ -42,6 +42,11 @@ }, { + "Name": "ns_private_match_countdown_length", + "DefaultValue": "15" + }, + + { // default 0 because broken "Name": "ns_private_match_override_maxplayers", "DefaultValue": "0" diff --git a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut index ac5b8129..3bef1cda 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut @@ -192,8 +192,10 @@ void function Evac( int evacTeam, float initialWait, float arrivalTime, float wa dropship.SetValueForModelKey( $"models/vehicle/crow_dropship/crow_dropship_hero.mdl" ) DispatchSpawn( dropship ) dropship.SetModel( $"models/vehicle/crow_dropship/crow_dropship_hero.mdl" ) + AddEntityCallback_OnKilled( dropship, EvacDropshipKilled ) dropship.s.evacSlots <- [ null, null, null, null, null, null, null, null ] + file.evacDropship = dropship dropship.EndSignal( "OnDestroy" ) OnThreadEnd( function() : ( evacTeam, completionCallback, dropship ) @@ -372,4 +374,16 @@ bool function PlayerInDropship( entity player, entity dropship ) return true return false +} + +void function EvacDropshipKilled( entity dropship, var damageInfo ) +{ + foreach ( entity player in dropship.s.evacSlots ) + { + if ( IsValid( player ) ) + { + player.ClearParent() + player.Die( DamageInfo_GetAttacker( damageInfo ), DamageInfo_GetWeapon( damageInfo ), { damageSourceId = eDamageSourceId.evac_dropship_explosion } ) + } + } }
\ No newline at end of file diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut index dd3d5e0e..08cc9d0b 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut @@ -123,8 +123,8 @@ void function StartMatch() SetUIVar( level, "privatematch_starting", ePrivateMatchStartState.STARTING ) // start countdown - SetUIVar( level, "gameStartTime", Time() + 15 ) - float countdownEndTime = Time() + 15.0 + SetUIVar( level, "gameStartTime", Time() + GetConVarFloat( "ns_private_match_countdown_length" ) ) + float countdownEndTime = Time() + GetConVarFloat( "ns_private_match_countdown_length" ) // can't use start here because we need to check stuff while ( Time() < countdownEndTime ) @@ -206,7 +206,7 @@ bool function ClientCommandCallback_PrivateMatchSetPlaylistVarOverride( entity p if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 ) if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) return true - + bool found = false foreach ( string category in GetPrivateMatchSettingCategories() ) { |