From: Mircea Kitsune Date: Fri, 21 Jan 2011 17:21:51 +0000 (+0200) Subject: Don't switch to another weapon when reloading, if there's no more ammo but there... X-Git-Tag: xonotic-v0.5.0~309^2~7^2~152 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1512b2525d4964c7611c38302566fb35b663e5de;p=xonotic%2Fxonotic-data.pk3dir.git Don't switch to another weapon when reloading, if there's no more ammo but there's still some load inside the gun --- diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 94074f100..c1c87d63e 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1646,8 +1646,11 @@ float W_ReloadCheck(float ammo_amount) sprint(self, strcat("You don't have any ammo to reload the ^2", W_Name(self.weapon), "\n")); self.reload_complain = time + 1; } - self.ammo_counter = -1; // reload later - W_SwitchToOtherWeapon(self); + if(!self.ammo_counter) + { + self.ammo_counter = -1; // reload later + W_SwitchToOtherWeapon(self); + } return 0; }