diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut | 8 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut | 29 |
2 files changed, 30 insertions, 7 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut index 4be04643..efaea76f 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut @@ -49,6 +49,7 @@ void function BurnMeter_Init() AddCallback_OnClientConnected( InitBurncardsForLateJoiner ) AddCallback_OnPlayerRespawned( StartPhaseRewindLifetime ) + AddCallback_OnTitanBecomesPilot( RemoveAmpedWeaponsForTitanPilot ) // necessary signals RegisterSignal( "StopAmpedWeapons" ) @@ -263,6 +264,13 @@ void function PlayerUsesAmpedWeaponsBurncardThreaded( entity player ) } } +void function RemoveAmpedWeaponsForTitanPilot( entity player, entity titan ) +{ + foreach ( entity weapon in player.GetMainWeapons() ) + foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) ) + weapon.RemoveMod( mod ) +} + void function PlayerUsesSmartPistolBurncard( entity player ) { // take secondary weapon diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut index 4f6a1291..78dec3d1 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut @@ -64,25 +64,40 @@ void function OnPrematchStart() // make 2 empty dropship structs per team IntroDropship emptyDropship - file.militiaDropships = [ clone emptyDropship, clone emptyDropship ] - file.imcDropships = [ clone emptyDropship, clone emptyDropship ] + file.militiaDropships.clear() + file.imcDropships.clear() - // spawn dropships - foreach ( entity dropshipSpawn in GetEntArrayByClass_Expensive( "info_spawnpoint_dropship_start" ) ) - { + array<entity> validDropshipSpawns + array<entity> dropshipSpawns = GetEntArrayByClass_Expensive( "info_spawnpoint_dropship_start" ) + foreach ( entity dropshipSpawn in dropshipSpawns ) + { if ( dropshipSpawn.HasKey( "gamemode_" + GetSpawnpointGamemodeOverride() ) ) if ( dropshipSpawn.kv[ "gamemode_" + GetSpawnpointGamemodeOverride() ] == "0" ) continue + + validDropshipSpawns.append( dropshipSpawn ) + } + + // if no dropship spawns for this mode, just allow any dropship spawns + if ( validDropshipSpawns.len() < 2 ) + validDropshipSpawns = dropshipSpawns + // spawn dropships + foreach ( entity dropshipSpawn in validDropshipSpawns ) + { // todo: possibly make this only spawn dropships if we've got enough players to need them int createTeam = HasSwitchedSides() ? dropshipSpawn.GetTeam() : GetOtherTeam( dropshipSpawn.GetTeam() ) array<IntroDropship> teamDropships = createTeam == TEAM_MILITIA ? file.militiaDropships : file.imcDropships - int dropshipIndex = !IsValid( teamDropships[ 0 ].dropship ) ? 0 : 1 + if ( teamDropships.len() >= 2 ) + continue + // create entity entity dropship = CreateDropship( createTeam, dropshipSpawn.GetOrigin(), dropshipSpawn.GetAngles() ) - teamDropships[ dropshipIndex ].dropship = dropship + teamDropships.append( clone emptyDropship ) + teamDropships[ teamDropships.len() - 1 ].dropship = dropship + AddAnimEvent( dropship, "dropship_warpout", WarpoutEffect ) dropship.SetValueForModelKey( $"models/vehicle/crow_dropship/crow_dropship_hero.mdl" ) dropship.SetModel( $"models/vehicle/crow_dropship/crow_dropship_hero.mdl" ) |