]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_weaponsystem.qc
Make sure we can never reload weapons inside stomachs
[voretournament/voretournament.git] / data / qcsrc / server / cl_weaponsystem.qc
index 10fef523f2e5669572e7619c2c792071945b0478..00360d68cb8b6d0d4d1aa89565ea1b32a312b87b 100644 (file)
@@ -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");\r
                return;\r
        }\r
-\r
        // return if reloading is disabled for this weapon\r
        if(!self.reload_ammo_amount)\r
                return;\r
-\r
+       // we can't reload weapons inside someone's stomach\r
+       if(self.predator.classname == "player")\r
+               return;\r
        // our weapon is fully loaded, no need to reload\r
        if (self.clip_load >= self.reload_ammo_amount)\r
                return;\r
-\r
        // no ammo, so nothing to load\r
        if(!self.(self.current_ammo) && self.reload_ammo_min)\r
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)\r