]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator/mutator_overkill.qc
Merge branch 'master' into TimePath/debug_draw
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator / mutator_overkill.qc
index 017a8a2e904347c1172e4c0e26a40ebb33cc5f15..a65efd53bc98c9475da188fc7f707d655aa75cb6 100644 (file)
@@ -206,9 +206,9 @@ MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
                        play2(self, SND(DRYFIRE));
                }
                Weapon wpn = get_weaponinfo(self.weapon);
-               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));
+               .entity weaponentity = weaponentities[0]; // TODO: unhardcode
+               if(self.(weaponentity).state != WS_CLEAR)
+                       w_ready(wpn, self, weaponentity, (self.BUTTON_ATCK ? 1 : 0) | (self.BUTTON_ATCK2 ? 2 : 0));
 
                self.weapon_blocked = true;
        }