]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/headshots
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

index 725a4fb6620798b2be464247dd957b0b6e363bd5,38a74c8e9481f0e84e70f5dff0575703367f371a..9d4ff22946a860be5b45d35e8ed09564510553f3
@@@ -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");
      }
  }
index 9d5ed09ef494df030f1174590e9f6babe99cbaab,77c99d16dd620de81cb3b7fc40ada87fca572b14..684ae22bc740858542996ce53647b45491b23ab8
@@@ -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
index ce4d1f67acf11610df61be6e90f9c68374c1f6eb,918eeb84c9bedfbfb5c50f1ed64b3a24ab00cd36..57668782f1da5ce889aa31dc733e6e3b0ba077b8
@@@ -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