From: MirceaKitsune Date: Sat, 16 Apr 2011 12:01:58 +0000 (+0300) Subject: Make sure we can never reload weapons inside stomachs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4b9a9a777bbbd30cb348f102372a7773b14993ef;p=voretournament%2Fvoretournament.git Make sure we can never reload weapons inside stomachs --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 10fef523..00360d68 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1614,15 +1614,15 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri dprint("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n"); return; } - // return if reloading is disabled for this weapon if(!self.reload_ammo_amount) return; - + // we can't reload weapons inside someone's stomach + if(self.predator.classname == "player") + return; // our weapon is fully loaded, no need to reload if (self.clip_load >= self.reload_ammo_amount) return; - // no ammo, so nothing to load if(!self.(self.current_ammo) && self.reload_ammo_min) if not(self.items & IT_UNLIMITED_WEAPON_AMMO)