From: Mario Date: Sat, 18 Jul 2020 17:15:15 +0000 (+1000) Subject: Merge branch 'master' into Mario/headshots X-Git-Tag: xonotic-v0.8.5~829^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1ce1c9c94867fb8ac44ab09c93eb092341dd6d9a;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into Mario/headshots --- 1ce1c9c94867fb8ac44ab09c93eb092341dd6d9a diff --cc qcsrc/common/turrets/turret/machinegun_weapon.qc index 725a4fb66,38a74c8e9..9d4ff2294 --- a/qcsrc/common/turrets/turret/machinegun_weapon.qc +++ b/qcsrc/common/turrets/turret/machinegun_weapon.qc @@@ -17,8 -17,8 +17,8 @@@ METHOD(MachineGunTurretAttack, wr_think actor.tur_head = actor; weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready); } - fireBullet(actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, actor.shot_force, DEATH_TURRET_MACHINEGUN.m_id, EFFECT_BULLET); + fireBullet(actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, 0, actor.shot_force, DEATH_TURRET_MACHINEGUN.m_id, EFFECT_BULLET); - W_MachineGun_MuzzleFlash(actor, weaponentity); + W_MuzzleFlash_Model(actor.(weaponentity), MDL_MACHINEGUN_MUZZLEFLASH); setattachment(actor.(weaponentity).muzzle_flash, actor.tur_head, "tag_fire"); } } diff --cc qcsrc/common/weapons/weapon/machinegun.qc index 9d5ed09ef,77c99d16d..684ae22bc --- a/qcsrc/common/weapons/weapon/machinegun.qc +++ b/qcsrc/common/weapons/weapon/machinegun.qc @@@ -51,14 -14,11 +14,11 @@@ void W_MachineGun_Attack(Weapon thiswep ATTACK_FINISHED(actor, weaponentity) = time + WEP_CVAR(machinegun, first_refire) * W_WeaponRateFactor(actor); if(actor.(weaponentity).misc_bulletcounter == 1) - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, first_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, first_damage), WEP_CVAR(machinegun, first_force), deathtype, EFFECT_BULLET); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, first_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, first_damage), 0, WEP_CVAR(machinegun, first_force), deathtype, EFFECT_BULLET); else - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), deathtype, EFFECT_BULLET); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), 0, WEP_CVAR(machinegun, sustained_force), deathtype, EFFECT_BULLET); - Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); - - W_MachineGun_MuzzleFlash(actor, weaponentity); - W_AttachToShotorg(actor, weaponentity, actor.(weaponentity).muzzle_flash, '5 0 0'); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); // casing code if(autocvar_g_casings >= 2) @@@ -155,12 -112,9 +112,9 @@@ void W_MachineGun_Attack_Burst(Weapon t actor.punchangle_y = random() - 0.5; } - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), thiswep.m_id, EFFECT_BULLET); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), 0, WEP_CVAR(machinegun, sustained_force), thiswep.m_id, EFFECT_BULLET); - Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); - - W_MachineGun_MuzzleFlash(actor, weaponentity); - W_AttachToShotorg(actor, weaponentity, actor.(weaponentity).muzzle_flash, '5 0 0'); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); if(autocvar_g_casings >= 2) // casing code { diff --cc qcsrc/common/weapons/weapon/vaporizer.qc index ce4d1f67a,918eeb84c..57668782f --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@@ -124,9 -124,11 +124,11 @@@ void W_Vaporizer_Attack(Weapon thiswep yoda = 0; damage_goodhits = 0; - FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, WEP_CVAR_PRI(vaporizer, force), 0, 0, 0, 0, thiswep.m_id); + FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, true, WEP_CVAR_PRI(vaporizer, force), 0, 0, 0, 0, thiswep.m_id); // do this now, as goodhits is disabled below + vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, normalize(v - w_shotorg)); SendCSQCVaporizerBeamParticle(actor, damage_goodhits); if(yoda && flying)