From: terencehill Date: Mon, 6 Feb 2023 19:07:20 +0000 (+0100) Subject: Remove BLASTER_SECONDARY_ATTACK, now less useful thanks to the previous commit X-Git-Tag: xonotic-v0.8.6~176 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b5de5f74e75c5736e50e7802fdc90eb9941007f;p=xonotic%2Fxonotic-data.pk3dir.git Remove BLASTER_SECONDARY_ATTACK, now less useful thanks to the previous commit --- diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index 1d8c5e87f..fe959f1ab 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 a86cdc519..7f204d1e1 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 85f337140..b24aac74f 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 4610a0b1d..dca2610fe 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 6b4b3aa8e..cd1d618a8 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 690fa891c..d603e09fe 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 8e95559d1..944e86405 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 25aa1b665..a3b49ba61 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);