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.gnut20
1 files changed, 4 insertions, 16 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
index 103efe6f6..bd289d4c2 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
@@ -54,8 +54,6 @@ void function SvLoadoutsMP_Init()
AddClientCommandCallback( "InGameMPMenuClosed", ClientCommandCallback_InGameMPMenuClosed )
AddClientCommandCallback( "LoadoutMenuClosed", ClientCommandCallback_LoadoutMenuClosed )
}
-
- AddCallback_OnPlayerKilled( DestroyDroppedWeapon )
}
void function SetLoadoutGracePeriodEnabled( bool enabled )
@@ -70,20 +68,10 @@ void function SetAllowLoadoutChangeFunc( bool functionref( entity ) func )
void function SetWeaponDropsEnabled( bool enabled )
{
- file.weaponDropsEnabled = enabled
-}
-
-void function DestroyDroppedWeapon( entity victim, entity attacker, var damageInfo )
-{
- if ( !file.weaponDropsEnabled && IsValid( victim.GetActiveWeapon() ) )
- thread DelayDestroyDroppedWeapon( victim.GetActiveWeapon() )
-}
-
-void function DelayDestroyDroppedWeapon( entity weapon )
-{
- WaitEndFrame()
- if ( IsValid( weapon ) )
- weapon.Destroy()
+ if( enabled )
+ FlagSet( "WeaponDropsAllowed" )
+ else
+ FlagClear( "WeaponDropsAllowed" )
}
void function AddCallback_OnTryGetTitanLoadout( TryGetTitanLoadoutCallbackType callback )