From 8b5de5f74e75c5736e50e7802fdc90eb9941007f Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 6 Feb 2023 20:07:20 +0100 Subject: [PATCH] Remove BLASTER_SECONDARY_ATTACK, now less useful thanks to the previous commit --- qcsrc/common/mutators/mutator/overkill/okhmg.qc | 6 ++++-- qcsrc/common/mutators/mutator/overkill/okmachinegun.qc | 6 ++++-- qcsrc/common/mutators/mutator/overkill/oknex.qc | 6 ++++-- qcsrc/common/mutators/mutator/overkill/okrpc.qc | 6 ++++-- qcsrc/common/mutators/mutator/overkill/okshotgun.qc | 6 ++++-- qcsrc/common/weapons/weapon/blaster.qc | 3 ++- qcsrc/common/weapons/weapon/blaster.qh | 8 -------- qcsrc/common/weapons/weapon/vaporizer.qc | 3 ++- 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index 1d8c5e87f9..fe959f1ab7 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qc @@ -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); } } diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc index a86cdc5194..7f204d1e10 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qc @@ -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); } } diff --git a/qcsrc/common/mutators/mutator/overkill/oknex.qc b/qcsrc/common/mutators/mutator/overkill/oknex.qc index 85f3371405..b24aac74f5 100644 --- a/qcsrc/common/mutators/mutator/overkill/oknex.qc +++ b/qcsrc/common/mutators/mutator/overkill/oknex.qc @@ -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; } diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qc b/qcsrc/common/mutators/mutator/overkill/okrpc.qc index 4610a0b1d8..dca2610fe4 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qc @@ -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); } } diff --git a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc index 6b4b3aa8e7..cd1d618a8c 100644 --- a/qcsrc/common/mutators/mutator/overkill/okshotgun.qc +++ b/qcsrc/common/mutators/mutator/overkill/okshotgun.qc @@ -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); } } diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 690fa891c4..d603e09fe5 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -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 diff --git a/qcsrc/common/weapons/weapon/blaster.qh b/qcsrc/common/weapons/weapon/blaster.qh index 8e95559d1b..944e86405d 100644 --- a/qcsrc/common/weapons/weapon/blaster.qh +++ b/qcsrc/common/weapons/weapon/blaster.qh @@ -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 diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index 25aa1b6658..a3b49ba614 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -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); -- 2.39.2