]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove BLASTER_SECONDARY_ATTACK, now less useful thanks to the previous commit
authorterencehill <piuntn@gmail.com>
Mon, 6 Feb 2023 19:07:20 +0000 (20:07 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 6 Feb 2023 19:07:20 +0000 (20:07 +0100)
qcsrc/common/mutators/mutator/overkill/okhmg.qc
qcsrc/common/mutators/mutator/overkill/okmachinegun.qc
qcsrc/common/mutators/mutator/overkill/oknex.qc
qcsrc/common/mutators/mutator/overkill/okrpc.qc
qcsrc/common/mutators/mutator/overkill/okshotgun.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/blaster.qh
qcsrc/common/weapons/weapon/vaporizer.qc

index 1d8c5e87f9aa043252c00dac81e78152066dd2b6..fe959f1ab7a6985a3dd1312206832c14b9c1d5b4 100644 (file)
@@ -64,7 +64,8 @@ METHOD(OverkillHeavyMachineGun, wr_think, void(entity thiswep, entity actor, .en
        {
                // Secondary uses it's own refire timer if refire_type is 1.
                actor.jump_interval = time + WEP_CVAR_SEC(okhmg, refire) * W_WeaponRateFactor(actor);
-               BLASTER_SECONDARY_ATTACK(okhmg, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
                        (actor.(weaponentity).wframe == WFRAME_FIRE2))
                {
@@ -101,7 +102,8 @@ METHOD(OverkillHeavyMachineGun, wr_think, void(entity thiswep, entity actor, .en
                {
                        return;
                }
-               BLASTER_SECONDARY_ATTACK(okhmg, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(okhmg, animtime), w_ready);
        }
 }
index a86cdc5194f3f2e21f7c936423a5bc41a913922b..7f204d1e10ea0a8328ad229e82dee527af73b003 100644 (file)
@@ -58,7 +58,8 @@ METHOD(OverkillMachineGun, wr_think, void(entity thiswep, entity actor, .entity
        {
                // Secondary uses it's own refire timer if refire_type is 1.
                actor.jump_interval = time + WEP_CVAR_SEC(okmachinegun, refire) * W_WeaponRateFactor(actor);
-               BLASTER_SECONDARY_ATTACK(okmachinegun, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
                        (actor.(weaponentity).wframe == WFRAME_FIRE2))
                {
@@ -95,7 +96,8 @@ METHOD(OverkillMachineGun, wr_think, void(entity thiswep, entity actor, .entity
                {
                        return;
                }
-               BLASTER_SECONDARY_ATTACK(okmachinegun, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(okmachinegun, animtime), w_ready);
        }
 }
index 85f33714054e1560f40c0ccf28a12a83b1b0c048..b24aac74f5a25d196fd955d144fe07637c9093b9 100644 (file)
@@ -141,7 +141,8 @@ METHOD(OverkillNex, wr_think, void(entity thiswep, entity actor, .entity weapone
        {
                // Secondary uses it's own refire timer if refire_type is 1.
                actor.jump_interval = time + WEP_CVAR_SEC(oknex, refire) * W_WeaponRateFactor(actor);
-               BLASTER_SECONDARY_ATTACK(oknex, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
                        (actor.(weaponentity).wframe == WFRAME_FIRE2))
                {
@@ -180,7 +181,8 @@ METHOD(OverkillNex, wr_think, void(entity thiswep, entity actor, .entity weapone
                {
                        return;
                }
-               BLASTER_SECONDARY_ATTACK(oknex, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(oknex, animtime), w_ready);
                return;
        }
index 4610a0b1d852924623d7d2e22b1985e07b1cc1d5..dca2610fe4498f5c9a59255560e89a5917416645 100644 (file)
@@ -139,7 +139,8 @@ METHOD(OverkillRocketPropelledChainsaw, wr_think, void(entity thiswep, entity ac
        {
                // Secondary uses it's own refire timer if refire_type is 1.
                actor.jump_interval = time + WEP_CVAR_SEC(okrpc, refire) * W_WeaponRateFactor(actor);
-               BLASTER_SECONDARY_ATTACK(okrpc, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
                        (actor.(weaponentity).wframe == WFRAME_FIRE2))
                {
@@ -176,7 +177,8 @@ METHOD(OverkillRocketPropelledChainsaw, wr_think, void(entity thiswep, entity ac
                {
                        return;
                }
-               BLASTER_SECONDARY_ATTACK(okrpc, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(okrpc, animtime), w_ready);
        }
 }
index 6b4b3aa8e76ee0d4063ff4d6816f72e0607bc377..cd1d618a8c9816adf00e3eda54096c96f285880b 100644 (file)
@@ -19,7 +19,8 @@ METHOD(OverkillShotgun, wr_think, void(entity thiswep, entity actor, .entity wea
        {
                // Secondary uses it's own refire timer if refire_type is 1.
                actor.jump_interval = time + WEP_CVAR_SEC(okshotgun, refire) * W_WeaponRateFactor(actor);
-               BLASTER_SECONDARY_ATTACK(okshotgun, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
                        (actor.(weaponentity).wframe == WFRAME_FIRE2))
                {
@@ -63,7 +64,8 @@ METHOD(OverkillShotgun, wr_think, void(entity thiswep, entity actor, .entity wea
                {
                        return;
                }
-               BLASTER_SECONDARY_ATTACK(okshotgun, actor, weaponentity);
+               makevectors(actor.v_angle);
+               W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(okshotgun, animtime), w_ready);
        }
 }
index 690fa891c40cc43677dff45b60366c1471efee76..d603e09fe53a1fa403294c26fc12f78d6ddcc35c 100644 (file)
@@ -164,7 +164,8 @@ METHOD(OffhandBlaster, offhand_think, void(OffhandBlaster this, entity actor, bo
        }
        actor.jump_interval = time + WEP_CVAR_SEC(blaster, refire) * W_WeaponRateFactor(actor);
        .entity weaponentity = weaponentities[1];
-       BLASTER_SECONDARY_ATTACK(blaster, actor, weaponentity);
+       makevectors(actor.v_angle);
+       W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
 }
 
 #endif
index 8e95559d1b8a2b6c03f4d31568aa1500a6f8e8af..944e86405d595f3882532c0e887ef419e1b308c0 100644 (file)
@@ -55,11 +55,3 @@ CLASS(OffhandBlaster, OffhandWeapon)
 ENDCLASS(OffhandBlaster)
 OffhandBlaster OFFHAND_BLASTER;
 STATIC_INIT(OFFHAND_BLASTER) { OFFHAND_BLASTER = NEW(OffhandBlaster); }
-
-#ifdef SVQC
-// Will be demacroed after WEP_CVAR macros are also demacroed.
-#define BLASTER_SECONDARY_ATTACK(weapon_name, actor, weaponentity) \
-       makevectors(actor.v_angle); \
-       W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
-
-#endif
index 25aa1b6658c62367fe0f9787f7230f2be7678a4c..a3b49ba614acb078da2c3192da5993e6b4303886 100644 (file)
@@ -297,7 +297,8 @@ METHOD(Vaporizer, wr_think, void(entity thiswep, entity actor, .entity weaponent
             if(WEP_CVAR_SEC(vaporizer, ammo))
                 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(vaporizer, ammo), weaponentity);
 
-            BLASTER_SECONDARY_ATTACK(vaporizer, actor, weaponentity);
+            makevectors(actor.v_angle);
+            W_Blaster_Attack(actor, weaponentity, WEP_BLASTER.m_id | HITTYPE_SECONDARY);
 
             // now do normal refire
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);