X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Felectro.qc;h=304fb12e620f2272386f41b5efe94b9119ed4dc1;hb=719ba01817465b96db552e18c7f277721d8dbb7e;hp=f5f6001dd4eb92d4bb91daa1fbe1c36374c0dcfc;hpb=cd141fba8a7c59fef4b0e98eee651943b18cd99d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index f5f6001dd..304fb12e6 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -404,19 +404,19 @@ void W_Electro_Attack_Orb(Weapon thiswep) MUTATOR_CALLHOOK(EditProjectile, self, proj); } -void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire) +void W_Electro_CheckAttack(Weapon thiswep, entity actor, .entity weaponentity, int fire) {SELFPARAM(); if(self.electro_count > 1) if(self.BUTTON_ATCK2) - if(weapon_prepareattack(thiswep, actor, slot, true, -1)) + if(weapon_prepareattack(thiswep, actor, weaponentity, true, -1)) { W_Electro_Attack_Orb(WEP_ELECTRO); self.electro_count -= 1; - weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack); return; } // WEAPONTODO: when the player releases the button, cut down the length of refire2? - w_ready(thiswep, actor, slot, fire); + w_ready(thiswep, actor, weaponentity, fire); } .float bot_secondary_electromooth; @@ -449,7 +449,7 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire) } } } - METHOD(Electro, wr_think, void(entity thiswep, entity actor, int slot, int fire)) + METHOD(Electro, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO { @@ -469,20 +469,20 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire) if(fire & 1) { - if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(electro, refire))) + if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) { W_Electro_Attack_Bolt(thiswep); - weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready); } } else if(fire & 2) { if(time >= actor.electro_secondarytime) - if(weapon_prepareattack(thiswep, actor, slot, true, WEP_CVAR_SEC(electro, refire))) + if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(electro, refire))) { W_Electro_Attack_Orb(thiswep); actor.electro_count = WEP_CVAR_SEC(electro, count); - weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack); actor.electro_secondarytime = time + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor(); } } @@ -555,7 +555,7 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire) org2 = w_org + w_backoff * 6; if(w_deathtype & HITTYPE_SECONDARY) { - pointparticles(particleeffectnum(EFFECT_ELECTRO_BALLEXPLODE), org2, '0 0 0', 1); + pointparticles(EFFECT_ELECTRO_BALLEXPLODE, org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM); } @@ -564,13 +564,13 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, int slot, int fire) if(w_deathtype & HITTYPE_BOUNCE) { // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls - pointparticles(particleeffectnum(EFFECT_ELECTRO_COMBO), org2, '0 0 0', 1); + pointparticles(EFFECT_ELECTRO_COMBO, org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, SND_ELECTRO_IMPACT_COMBO, VOL_BASE, ATTEN_NORM); } else { - pointparticles(particleeffectnum(EFFECT_ELECTRO_IMPACT), org2, '0 0 0', 1); + pointparticles(EFFECT_ELECTRO_IMPACT, org2, '0 0 0', 1); if(!w_issilent) sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM); }