X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fmachinegun_weapon.qc;h=c60cd3b37e11ff245e3877dd76c638585079ce3c;hp=34cd32d74279c07a8ebda0744d5cab5e422a1810;hb=87bec07409c336c956a798556064c6819ad40a4d;hpb=fd20a1f1eae2b2ba955ce9ddedc20cd151a6f362 diff --git a/qcsrc/common/turrets/turret/machinegun_weapon.qc b/qcsrc/common/turrets/turret/machinegun_weapon.qc index 34cd32d74..c60cd3b37 100644 --- a/qcsrc/common/turrets/turret/machinegun_weapon.qc +++ b/qcsrc/common/turrets/turret/machinegun_weapon.qc @@ -4,7 +4,7 @@ #ifdef SVQC -void W_MachineGun_MuzzleFlash(entity actor); +void W_MachineGun_MuzzleFlash(entity actor, .entity weaponentity); SOUND(MachineGunTurretAttack_FIRE, W_Sound("electro_fire")); METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { @@ -13,15 +13,15 @@ METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, entity actor, .ent if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(machinegun, sustained_refire))) { if (isPlayer) { turret_initparams(actor); - W_SetupShot_Dir(actor, v_forward, false, 0, SND_MachineGunTurretAttack_FIRE, CH_WEAPON_B, 0); + W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MachineGunTurretAttack_FIRE, CH_WEAPON_B, 0); actor.tur_shotdir_updated = w_shotdir; actor.tur_shotorg = w_shotorg; actor.tur_head = actor; weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready); } - fireBullet (actor, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, actor.shot_force, DEATH_TURRET_MACHINEGUN.m_id, 0); - W_MachineGun_MuzzleFlash(actor); - setattachment(actor.muzzle_flash, actor.tur_head, "tag_fire"); + 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, 0); + W_MachineGun_MuzzleFlash(actor, weaponentity); + setattachment(actor.(weaponentity).muzzle_flash, actor.tur_head, "tag_fire"); } }