aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/evac/_evac.gnut15
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut4
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut7
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut7
4 files changed, 26 insertions, 7 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
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
index bba70358..3bc11c3a 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
@@ -104,7 +104,9 @@ void function DropFlag()
file.flag.ClearParent()
file.flag.SetAngles( < 0, 0, 0 > )
SetGlobalNetEnt( "flagCarrier", file.flag )
- EmitSoundOnEntityOnlyToPlayer( file.flagCarrier, file.flagCarrier, "UI_CTF_1P_FlagDrop" )
+
+ if ( IsValid( file.flagCarrier ) )
+ EmitSoundOnEntityOnlyToPlayer( file.flagCarrier, file.flagCarrier, "UI_CTF_1P_FlagDrop" )
foreach ( entity player in GetPlayerArray() )
MessageToPlayer( player, eEventNotifications.SPEEDBALL_FlagDropped, file.flagCarrier )
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 78dec3d1..8e624c14 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
@@ -125,6 +125,8 @@ void function EndIntroWhenFinished()
void function SpawnPlayerIntoDropship( entity player )
{
+ player.EndSignal( "OnDestroy" )
+
if ( IsAlive( player ) )
player.Die() // kill them so we don't have any issues respawning them later
@@ -148,7 +150,6 @@ void function SpawnPlayerIntoDropship( entity player )
WaitFrame()
player.EndSignal( "OnDeath" )
- player.EndSignal( "OnDestroy" )
// find the player's dropship and seat
array<IntroDropship> teamDropships
@@ -179,6 +180,7 @@ void function SpawnPlayerIntoDropship( entity player )
// respawn player and holster their weapons so they aren't out
player.RespawnPlayer( null )
+ HolsterAndDisableWeapons(player)
player.DisableWeaponViewModel()
// hide hud and fade screen out from black
@@ -186,7 +188,7 @@ void function SpawnPlayerIntoDropship( entity player )
ScreenFadeFromBlack( player, 0.5, 0.5 )
// faction leaders are done clientside, spawn them here
Remote_CallFunction_NonReplay( player, "ServerCallback_SpawnFactionCommanderInDropship", playerDropship.dropship.GetEncodedEHandle(), file.introStartTime )
-
+
// do firstperson sequence
FirstPersonSequenceStruct idleSequence
idleSequence.firstPersonAnim = DROPSHIP_IDLE_ANIMS_POV[ playerDropshipIndex ]
@@ -228,6 +230,7 @@ void function PlayerJumpsFromDropship( entity player )
// show weapon viewmodel and hud and let them move again
player.MovementEnable()
player.EnableWeaponViewModel()
+ DeployAndEnableWeapons(player)
RemoveCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING )
}
})
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut
index 7b126cd0..c84e6aba 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut
@@ -178,7 +178,12 @@ void function GiveWeaponsFromStoredArray( entity player, array<StoredWeapon> sto
UpdateProScreen( player, weapon )
}
- string weaponCategory = GetWeaponInfoFileKeyField_GlobalString( weapon.GetWeaponClassName(), "menu_category" )
+ string weaponCategory = ""
+ if ( IsWeaponKeyFieldDefined(weapon.GetWeaponClassName(), "menu_category") )
+ {
+ weaponCategory = GetWeaponInfoFileKeyField_GlobalString( weapon.GetWeaponClassName(), "menu_category" )
+ }
+
if ( weaponCategory == "at" || weaponCategory == "special" ) // refill AT/grenadier ammo stockpile
{
int defaultTotal = weapon.GetWeaponSettingInt( eWeaponVar.ammo_default_total )