diff --git a/gamemodes/irresistible/cnr/features/weapon_drop.pwn b/gamemodes/irresistible/cnr/features/weapon_drop.pwn index b4712ed..7123c1a 100644 --- a/gamemodes/irresistible/cnr/features/weapon_drop.pwn +++ b/gamemodes/irresistible/cnr/features/weapon_drop.pwn @@ -13,8 +13,6 @@ #error "This module requires weapon data functions" #endif -#define WEAPON_DROP_ENABLED - /* ** Definitions ** */ #define MAX_WEAPON_DROPS ( 100 ) @@ -41,6 +39,12 @@ hook OnGameModeInit( ) return 1; } +hook OnServerUpdate( ) +{ + ClearInactiveWeaponDrops( ); + return 1; +} + #if defined AC_INCLUDED hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart ) #else @@ -394,7 +398,7 @@ stock CreateWeaponPickup( weaponid, ammo, slotid, Float: X, Float: Y, Float: Z, } else { - ClearInactiveWeaponDrops( gettime( ) ); + ClearInactiveWeaponDrops( ); } return handle; } @@ -409,8 +413,11 @@ stock DestroyWeaponPickup( handle ) return 1; } -stock ClearInactiveWeaponDrops( global_timestamp ) +stock ClearInactiveWeaponDrops( ) { + new + global_timestamp = GetServerTime( ); + foreach ( new dropid : weapondrop ) if ( g_weaponDropData[ dropid ] [ E_EXPIRE_TIMESTAMP ] != 0 && global_timestamp > g_weaponDropData[ dropid ] [ E_EXPIRE_TIMESTAMP ] ) { new diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index b7ad2d2..85ba883 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -948,11 +948,6 @@ public OnServerUpdateTimer( ) // Restore and Replenish Stuff if ( g_iTime > g_RestoreRobberiesBribes ) { - #if defined WEAPON_DROP_ENABLED - // Replenish Weapon Drops - ClearInactiveWeaponDrops( g_iTime ); - #endif - // Replenish Vaults for( new i = 0; i < sizeof( g_bankvaultData ); i++ ) if ( g_bankvaultData[ i ] [ E_DISABLED ] && g_iTime > g_bankvaultData[ i ] [ E_TIMESTAMP_CLOSE ] ) {