diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut | 20 |
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 63756fdc..141cfe15 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut @@ -51,8 +51,6 @@ void function SvLoadoutsMP_Init() AddClientCommandCallback( "InGameMPMenuClosed", ClientCommandCallback_InGameMPMenuClosed ) AddClientCommandCallback( "LoadoutMenuClosed", ClientCommandCallback_LoadoutMenuClosed ) } - - AddCallback_OnPlayerKilled( DestroyDroppedWeapon ) } void function SetLoadoutGracePeriodEnabled( bool enabled ) @@ -62,20 +60,10 @@ void function SetLoadoutGracePeriodEnabled( bool enabled ) 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 ) |