]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/weaponsystem.qc
Merge branches 'TimePath/weaponsys' and 'Mario/modpack'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / weaponsystem.qc
index d06d11cd97ad6909f25e300e7e48fe3566c78257..08568ec86e09d41d5f0c15599be5b3a1fe9d6873 100644 (file)
@@ -472,11 +472,11 @@ float weapon_prepareattack_checkammo(float secondary)
        {
                // always keep the Mine Layer if we placed mines, so that we can detonate them
                entity mine;
-               if(self.weapon == WEP_MINE_LAYER)
+               if(self.weapon == WEP_MINE_LAYER.m_id)
                for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
                        return false;
 
-               if(self.weapon == WEP_SHOTGUN)
+               if(self.weapon == WEP_SHOTGUN.m_id)
                if(!secondary && WEP_CVAR(shotgun, secondary) == 1)
                        return false; // no clicking, just allow
 
@@ -637,7 +637,7 @@ void weapon_thinkf(float fr, float t, void() func)
 
        if((fr == WFRAME_FIRE1 || fr == WFRAME_FIRE2) && t)
        {
-               if((self.weapon == WEP_SHOCKWAVE || self.weapon == WEP_SHOTGUN) && fr == WFRAME_FIRE2)
+               if((self.weapon == WEP_SHOCKWAVE.m_id || self.weapon == WEP_SHOTGUN.m_id) && fr == WFRAME_FIRE2)
                        animdecide_setaction(self, ANIMACTION_MELEE, restartanim);
                else
                        animdecide_setaction(self, ANIMACTION_SHOOT, restartanim);