]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't switch to another weapon when reloading, if there's no more ammo but there...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 21 Jan 2011 17:21:51 +0000 (19:21 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 21 Jan 2011 17:21:51 +0000 (19:21 +0200)
qcsrc/server/cl_weaponsystem.qc

index 94074f1000cca7cac7569b121586a5e0b183b52e..c1c87d63e972658783532e67db055f86b8a01ee5 100644 (file)
@@ -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;
        }