Merge branch 'master' into Mario/headshots 839/head
authorMario <mario.mario@y7mail.com>
Sat, 18 Jul 2020 17:15:15 +0000 (03:15 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 18 Jul 2020 17:15:15 +0000 (03:15 +1000)
1  2 
qcsrc/common/mutators/mutator/overkill/okhmg.qc
qcsrc/common/mutators/mutator/overkill/okmachinegun.qc
qcsrc/common/turrets/turret/machinegun_weapon.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/rifle.qh
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.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");
      }
  }
@@@ -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
        {
Simple merge
Simple merge
@@@ -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)
Simple merge