]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/electro.qc
Weapons: Introduce concept of offhand weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / electro.qc
index 073a4e0f597ea73fab2d6c8d77d7e5b72d3dfc43..5a23f8849c2aad63a8ddcde333a4e2845fd9d24c 100644 (file)
@@ -453,7 +453,7 @@ void W_Electro_CheckAttack(void)
 
                        return true;
                }
-               METHOD(Electro, wr_think, bool(entity thiswep))
+               METHOD(Electro, wr_think, bool(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO
                        {
@@ -472,7 +472,7 @@ void W_Electro_CheckAttack(void)
                                return true;
                        }
 
-                       if(self.BUTTON_ATCK)
+                       if(fire1)
                        {
                                if(weapon_prepareattack(0, WEP_CVAR_PRI(electro, refire)))
                                {
@@ -480,7 +480,7 @@ void W_Electro_CheckAttack(void)
                                                weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
                                }
                        }
-                       else if(self.BUTTON_ATCK2)
+                       else if(fire2)
                        {
                                if(time >= self.electro_secondarytime)
                                if(weapon_prepareattack(1, WEP_CVAR_SEC(electro, refire)))