]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Properly check the weapon we are switching to
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 17:03:21 +0000 (19:03 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 17:03:21 +0000 (19:03 +0200)
qcsrc/server/cl_weaponsystem.qc

index fd1da3162973fed859974ec84b7362eb1245bc72..5b444e7d19ec43f8febd65934bad9c5c6282285a 100644 (file)
@@ -931,7 +931,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                                // allow switching to reloadable weapons, even if we're out of ammo, since the weapon itself
                                // might still be loaded. The reload code takes care of complaining and forced switching
                                entity e;
-                               e = get_weaponinfo(self.switchweapon);
+                               e = get_weaponinfo(wpn);
                                if(cvar(strcat("g_balance_", e.netname, "_reload_ammo")))
                                        f = 1;