aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut11
1 files changed, 9 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
index 2017b64b9..af028e71b 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
@@ -55,7 +55,14 @@ void function SetWeaponDropsEnabled( bool enabled )
void function DestroyDroppedWeapon( entity victim, entity attacker, var damageInfo )
{
if ( !file.weaponDropsEnabled && IsValid( victim.GetActiveWeapon() ) )
- victim.GetActiveWeapon().Destroy()
+ thread DelayDestroyDroppedWeapon( victim.GetActiveWeapon() )
+}
+
+void function DelayDestroyDroppedWeapon( entity weapon )
+{
+ WaitEndFrame()
+ if ( IsValid( weapon ) )
+ weapon.Destroy()
}
TitanLoadoutDef function GetTitanLoadoutForPlayer( entity player )
@@ -258,7 +265,7 @@ void function TryGivePilotLoadoutForGracePeriod( entity player )
else
respawnTimeReal = expect float( player.s.respawnTime )
- if ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || player.p.usingLoadoutCrate || GetGameState() < eGameState.Playing )
+ if ( ( ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || GetGameState() < eGameState.Playing ) && file.loadoutGracePeriodEnabled ) || player.p.usingLoadoutCrate )
{
// because the game sucks and stuff Loadouts_TryGivePilotLoadout doesn't work in intro so have to do this manually
int loadoutIndex = GetPersistentSpawnLoadoutIndex( player, "pilot" )