]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/mutator_overkill.qc
Weapons: add a second .weaponentity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / mutator_overkill.qc
index a07c18e134d5566e1bd5af4bf15e08919b39860f..0df6accdd3c25b7947fc52c3adefba0838642c97 100644 (file)
@@ -207,8 +207,9 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
                        play2(self, SND(DRYFIRE));
                }
                Weapon wpn = get_weaponinfo(self.weapon);
-               if(self.weaponentity.state != WS_CLEAR)
-                       w_ready(wpn, self, 0, (self.BUTTON_ATCK ? 1 : 0) | (self.BUTTON_ATCK2 ? 2 : 0));
+               int slot = 0; // TODO: unhardcode
+               if(self.weaponentity[slot].state != WS_CLEAR)
+                       w_ready(wpn, self, slot, (self.BUTTON_ATCK ? 1 : 0) | (self.BUTTON_ATCK2 ? 2 : 0));
 
                self.weapon_blocked = true;
        }