return 0;
if (g_weaponarena)
return 0;
- if (g_cts)
- return 0;
if (g_nexball && w == WEP_GRENADE_LAUNCHER)
return 0;
if(w == 0)
w = self.weapon;
if (w == 0)
return; // just in case
+ if(self.frozen)
+ return;
if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon))
return;
if(!autocvar_g_weapon_throwable)
Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
}
-float forbidWeaponUse()
+float forbidWeaponUse(entity player)
{
if(time < game_starttime && !autocvar_sv_ready_restart_after_countdown)
return 1;
if(round_handler_IsActive() && !round_handler_IsRoundStarted())
return 1;
- if(self.player_blocked)
+ if(player.player_blocked)
return 1;
- if(self.freezetag_frozen)
+ if(player.frozen)
return 1;
return 0;
}
if (!self.weaponentity || self.health < 1)
return; // Dead player can't use weapons and injure impulse commands
- if(forbidWeaponUse())
+ if(forbidWeaponUse(self))
if(self.weaponentity.state != WS_CLEAR)
{
w_ready();