X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fhagar.qc;h=a8c12efccd2002dad48197ffccd8be1b6be6a3c0;hb=33885ba02998d463c0c4f7e5ea26a7489980cc35;hp=0ffa0c74d973b92f00f9c5fb4b06b22a522f0704;hpb=4b615d6ea3ee6794ea9368c782393c66ef55c170;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 0ffa0c74d..a8c12efcc 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -83,7 +83,7 @@ void W_Hagar_Attack(Weapon thiswep, entity actor, .entity weaponentity) W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage), thiswep.m_id); - Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); missile = new(missile); missile.owner = missile.realowner = actor; @@ -129,7 +129,7 @@ void W_Hagar_Attack2(Weapon thiswep, entity actor, .entity weaponentity) W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage), thiswep.m_id | HITTYPE_SECONDARY); - Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); missile = new(missile); missile.owner = missile.realowner = actor; @@ -185,7 +185,7 @@ void W_Hagar_Attack2_Load_Release(Weapon thiswep, entity actor, .entity weaponen shots = actor.(weaponentity).hagar_load; W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage) * shots, thiswep.m_id | HITTYPE_SECONDARY); - Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); forward = v_forward; right = v_right; @@ -221,7 +221,7 @@ void W_Hagar_Attack2_Load_Release(Weapon thiswep, entity actor, .entity weaponen // per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar) spread_pershot = ((shots - 1) / (WEP_CVAR_SEC(hagar, load_max) - 1)); spread_pershot = (1 - (spread_pershot * WEP_CVAR_SEC(hagar, load_spread_bias))); - spread_pershot = (WEP_CVAR_SEC(hagar, spread) * spread_pershot * g_weaponspreadfactor); + spread_pershot = (WEP_CVAR_SEC(hagar, spread) * spread_pershot * autocvar_g_weaponspreadfactor); // pattern spread calculation s = '0 0 0'; @@ -233,7 +233,7 @@ void W_Hagar_Attack2_Load_Release(Weapon thiswep, entity actor, .entity weaponen s.y = v_forward.x; s.z = v_forward.y; } - s = s * WEP_CVAR_SEC(hagar, load_spread) * g_weaponspreadfactor; + s = s * WEP_CVAR_SEC(hagar, load_spread) * autocvar_g_weaponspreadfactor; W_SetupProjVelocity_Explicit(missile, w_shotdir + right * s.y + up * s.z, v_up, WEP_CVAR_SEC(hagar, speed), 0, 0, spread_pershot, false); @@ -387,9 +387,9 @@ void W_Hagar_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity, int METHOD(Hagar, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) { if(random()>0.15) - PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false); + PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false, true); else // not using secondary_speed since these are only 15% and should cause some ricochets without re-aiming - PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false); + PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false, true); } METHOD(Hagar, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { @@ -481,8 +481,7 @@ METHOD(Hagar, wr_killmessage, Notification(entity thiswep)) METHOD(Hagar, wr_impacteffect, void(entity thiswep, entity actor)) { - vector org2; - org2 = w_org + w_backoff * 6; + vector org2 = w_org + w_backoff * 2; pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1); if(!w_issilent) {