]> de.git.xonotic.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 8994dda66377dc70033f571e57951d13d2eca5b7,51b3c05d9cf757638a54837e9aa9b6a66a1ecac4..31db0c4db92e2663a54f0b3a9f0069220a8848a8
@@@ -36,14 -36,11 +36,11 @@@ void W_OverkillHeavyMachineGun_Attack_A
        }
  
        float okhmg_spread = bound(WEP_CVAR_PRI(okhmg, spread_min), WEP_CVAR_PRI(okhmg, spread_min) + (WEP_CVAR_PRI(okhmg, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR_PRI(okhmg, spread_max));
 -      fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okhmg_spread, WEP_CVAR_PRI(okhmg, solidpenetration), WEP_CVAR_PRI(okhmg, damage), WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, EFFECT_RIFLE);
 +      fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okhmg_spread, WEP_CVAR_PRI(okhmg, solidpenetration), WEP_CVAR_PRI(okhmg, damage), 0, WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, EFFECT_RIFLE);
  
        actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
  
-       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
        {
index 698fb6f85bbb0c05a88e3bc0cbf6f75d102844ad,b64af05f766a719632fd7411decc38170662c22f..9ce9a2901856e313dd6d2c07f06f3412fb6a7e7d
@@@ -30,14 -30,11 +30,11 @@@ void W_OverkillMachineGun_Attack_Auto(W
        }
  
        okmachinegun_spread = bound(WEP_CVAR_PRI(okmachinegun, spread_min), WEP_CVAR_PRI(okmachinegun, spread_min) + (WEP_CVAR_PRI(okmachinegun, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR_PRI(okmachinegun, spread_max));
 -      fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okmachinegun_spread, WEP_CVAR_PRI(okmachinegun, solidpenetration), WEP_CVAR_PRI(okmachinegun, damage), WEP_CVAR_PRI(okmachinegun, force), WEP_OVERKILL_MACHINEGUN.m_id, EFFECT_RIFLE);
 +      fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okmachinegun_spread, WEP_CVAR_PRI(okmachinegun, solidpenetration), WEP_CVAR_PRI(okmachinegun, damage), 0, WEP_CVAR_PRI(okmachinegun, force), WEP_OVERKILL_MACHINEGUN.m_id, EFFECT_RIFLE);
  
        actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
  
-       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
        {
index 725a4fb6620798b2be464247dd957b0b6e363bd5,38a74c8e9481f0e84e70f5dff0575703367f371a..9d4ff22946a860be5b45d35e8ed09564510553f3
@@@ -2,7 -2,7 +2,7 @@@
  
  #ifdef SVQC
  
- void W_MachineGun_MuzzleFlash(entity actor, .entity weaponentity);
+ void W_MuzzleFlash_Model(entity wepent, entity muzzlemodel);
  SOUND(MachineGunTurretAttack_FIRE, W_Sound("electro_fire"));
  METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
  {
@@@ -17,8 -17,8 +17,8 @@@
              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
@@@ -2,43 -2,6 +2,6 @@@
  
  #ifdef SVQC
  
- void W_MachineGun_MuzzleFlash_Think(entity this)
- {
-       this.frame += 2;
-       this.scale *= 0.5;
-       this.alpha -= 0.25;
-       this.nextthink = time + 0.05;
-       if(this.alpha <= 0)
-       {
-               setthink(this, SUB_Remove);
-               this.nextthink = time;
-               this.realowner.muzzle_flash = NULL;
-               return;
-       }
- }
- void W_MachineGun_MuzzleFlash(entity actor, .entity weaponentity)
- {
-       entity wepent = actor.(weaponentity);
-       if(wepent.muzzle_flash == NULL)
-               wepent.muzzle_flash = spawn();
-       // muzzle flash for 1st person view
-       setmodel(wepent.muzzle_flash, MDL_MACHINEGUN_MUZZLEFLASH); // precision set below
-       wepent.muzzle_flash.scale = 0.75;
-       setthink(wepent.muzzle_flash, W_MachineGun_MuzzleFlash_Think);
-       wepent.muzzle_flash.nextthink = time + 0.02;
-       wepent.muzzle_flash.frame = 2;
-       wepent.muzzle_flash.alpha = 0.75;
-       wepent.muzzle_flash.angles_z = random() * 180;
-       wepent.muzzle_flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
-       wepent.muzzle_flash.owner = wepent.muzzle_flash.realowner = wepent;
- }
  void W_MachineGun_Attack(Weapon thiswep, int deathtype, entity actor, .entity weaponentity)
  {
        W_SetupShot(actor, weaponentity, true, 0, SND_UZI_FIRE, CH_WEAPON_A, ((actor.(weaponentity).misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage)), deathtype);
        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)
@@@ -127,14 -87,11 +87,11 @@@ void W_MachineGun_Attack_Auto(Weapon th
        }
  
        machinegun_spread = bound(WEP_CVAR(machinegun, spread_min), WEP_CVAR(machinegun, spread_min) + (WEP_CVAR(machinegun, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR(machinegun, spread_max));
 -      fireBullet(actor, weaponentity, w_shotorg, w_shotdir, machinegun_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, machinegun_spread, WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), 0, WEP_CVAR(machinegun, sustained_force), thiswep.m_id, EFFECT_BULLET);
  
        actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
  
-       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
        {
@@@ -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
        {
index 57cb67e123c857372cfb4732af907e2ce2e915ca,456e79c0319320f34da47fecfb0c4ebd5c2aca77..9f4bdc15e63d1ba3c6ef9e14177ce084952f97d7
@@@ -2,7 -2,7 +2,7 @@@
  
  #ifdef SVQC
  
 -void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, int deathtype, float pTracer, float pShots, Sound pSound, entity actor)
 +void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, float pSpread, float pDamage, float pHeadshotDamage, float pForce, float pSolidPenetration, float pAmmo, int deathtype, float pTracer, float pShots, Sound pSound, entity actor)
  {
        float i;
  
@@@ -10,7 -10,7 +10,7 @@@
  
        W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots, deathtype);
  
-       Send_Effect(EFFECT_RIFLE_MUZZLEFLASH, w_shotorg, w_shotdir * 2000, 1);
+       W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir * 2);
  
        if(PHYS_INPUT_BUTTON_ZOOM(actor) | PHYS_INPUT_BUTTON_ZOOMSCRIPT(actor)) // if zoomed, shoot from the eye
        {
@@@ -19,7 -19,7 +19,7 @@@
        }
  
        for(i = 0; i < pShots; ++i)
 -              fireBullet(actor, weaponentity, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pForce, deathtype, (pTracer ? EFFECT_RIFLE : EFFECT_RIFLE_WEAK));
 +              fireBullet(actor, weaponentity, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pHeadshotDamage, pForce, deathtype, (pTracer ? EFFECT_RIFLE : EFFECT_RIFLE_WEAK));
  
        if(autocvar_g_casings >= 2)
      {
  
  void W_Rifle_Attack(Weapon thiswep, entity actor, .entity weaponentity)
  {
 -      W_Rifle_FireBullet(thiswep, weaponentity, WEP_CVAR_PRI(rifle, spread), WEP_CVAR_PRI(rifle, damage), WEP_CVAR_PRI(rifle, force), WEP_CVAR_PRI(rifle, solidpenetration), WEP_CVAR_PRI(rifle, ammo), thiswep.m_id, WEP_CVAR_PRI(rifle, tracer), WEP_CVAR_PRI(rifle, shots), SND_CAMPINGRIFLE_FIRE, actor);
 +      W_Rifle_FireBullet(thiswep, weaponentity, WEP_CVAR_PRI(rifle, spread), WEP_CVAR_PRI(rifle, damage), WEP_CVAR_PRI(rifle, headshot_multiplier), WEP_CVAR_PRI(rifle, force), WEP_CVAR_PRI(rifle, solidpenetration), WEP_CVAR_PRI(rifle, ammo), thiswep.m_id, WEP_CVAR_PRI(rifle, tracer), WEP_CVAR_PRI(rifle, shots), SND_CAMPINGRIFLE_FIRE, actor);
  }
  
  void W_Rifle_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
  {
 -      W_Rifle_FireBullet(thiswep, weaponentity, WEP_CVAR_SEC(rifle, spread), WEP_CVAR_SEC(rifle, damage), WEP_CVAR_SEC(rifle, force), WEP_CVAR_SEC(rifle, solidpenetration), WEP_CVAR_SEC(rifle, ammo), thiswep.m_id | HITTYPE_SECONDARY, WEP_CVAR_SEC(rifle, tracer), WEP_CVAR_SEC(rifle, shots), SND_CAMPINGRIFLE_FIRE2, actor);
 +      W_Rifle_FireBullet(thiswep, weaponentity, WEP_CVAR_SEC(rifle, spread), WEP_CVAR_SEC(rifle, damage), WEP_CVAR_SEC(rifle, headshot_multiplier), WEP_CVAR_SEC(rifle, force), WEP_CVAR_SEC(rifle, solidpenetration), WEP_CVAR_SEC(rifle, ammo), thiswep.m_id | HITTYPE_SECONDARY, WEP_CVAR_SEC(rifle, tracer), WEP_CVAR_SEC(rifle, shots), SND_CAMPINGRIFLE_FIRE2, actor);
  }
  
  .void(Weapon thiswep, entity actor, .entity weaponentity) rifle_bullethail_attackfunc;
index 3fbe1a28700b6006b9fa528bb84a34e168895e17,679a3fb0cdb271b85210be2ad6c8c25a6725a8ab..7a2348af740d78954bd6ae86e09af5f1ef1ae4a3
@@@ -10,6 -10,8 +10,8 @@@ CLASS(Rifle, Weapon
  /* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
  #ifdef GAMEQC
  /* model     */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
+ /* flash mdl */ ATTRIB(Rifle, m_muzzlemodel, Model, MDL_Null);
+ /* flash eff */ ATTRIB(Rifle, m_muzzleeffect, entity, EFFECT_RIFLE_MUZZLEFLASH);
  #endif
  /* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
  /* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
@@@ -27,7 -29,6 +29,7 @@@
                P(class, prefix, bursttime, float, NONE) \
                P(class, prefix, damage, float, BOTH) \
                P(class, prefix, force, float, BOTH) \
 +              P(class, prefix, headshot_multiplier, float, BOTH) \
                P(class, prefix, refire, float, BOTH) \
                P(class, prefix, reload, float, SEC) \
                P(class, prefix, reload_ammo, float, NONE) \
index 6ffaf7965521825b0407239835b3732aa7adb081,8928ec21c165a0ef981ebe10d7453decc36d37e5..3e25800cce5a69119e3073358f1822ac87d4c04c
@@@ -26,12 -26,12 +26,12 @@@ void W_Shotgun_Attack(Weapon thiswep, e
                antilag_takeback_all(actor, lag);
  
        for(int sc = 0;sc < bullets;sc = sc + 1)
 -              fireBullet_antilag(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, force, thiswep.m_id, bullet_trail_effect, false);
 +              fireBullet_antilag(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, 0, force, thiswep.m_id, bullet_trail_effect, false);
        
        if(lag && bullets > 0)
                antilag_restore_all(actor);
  
-       Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, ammocount);
+       W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
  
        // casing code
        if(autocvar_g_casings >= 1)
                //for(int sc = 0;sc < WEP_CVAR_PRI(shotgun, ammo);sc = sc + 1)
                        SpawnCasing(((random() * 50 + 50) * v_right) - (v_forward * (random() * 25 + 25)) - ((random() * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1, actor, weaponentity);
        }
-       // muzzle flash for 1st person view
-       entity flash = spawn();
-       setmodel(flash, MDL_SHOTGUN_MUZZLEFLASH); // precision set below
-       setthink(flash, SUB_Remove);
-       flash.nextthink = time + 0.06;
-       flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
-       W_AttachToShotorg(actor, weaponentity, flash, '5 0 0');
  }
  
  .float swing_prev;
index ce4d1f67acf11610df61be6e90f9c68374c1f6eb,918eeb84c9bedfbfb5c50f1ed64b3a24ab00cd36..57668782f1da5ce889aa31dc733e6e3b0ba077b8
@@@ -85,7 -85,7 +85,7 @@@ NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, b
        this.sv_entnum = myowner;
        this.team = ReadByte() - 1;
  
-       pointparticles(EFFECT_VORTEX_MUZZLEFLASH, this.vorg1, normalize(this.vorg2 - this.vorg1) * 1000, 1);
+       //pointparticles(EFFECT_VORTEX_MUZZLEFLASH, this.vorg1, normalize(this.vorg2 - this.vorg1) * 1000, 1);
  
        if(autocvar_cl_vaporizerbeam_particle)
        {
@@@ -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)
@@@ -186,7 -188,8 +188,8 @@@ void W_RocketMinsta_Attack2(entity acto
  
        W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
  
-       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+       // uses electro effects
+       W_MuzzleFlash(WEP_ELECTRO, actor, weaponentity, w_shotorg, w_shotdir);
  
      while(counter < total)
        {
@@@ -238,7 -241,8 +241,8 @@@ void W_RocketMinsta_Attack3 (entity act
  
        W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
  
-       Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+       // uses electro effects
+       W_MuzzleFlash(WEP_ELECTRO, actor, weaponentity, w_shotorg, w_shotdir);
  
      while(counter < total)
        {
index a6207ea06532b1a002e73c45e3c1b1f6c4d22eb6,bf179e374d3d24df2ddae085a84b33e124104765..5a1cd1a9200469c801d85576596ec7bf43117761
@@@ -55,7 -55,7 +55,7 @@@ NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, 
      vector endpos = ReadVector();
        charge = ReadByte() / 255.0;
  
-       pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
+       //pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
  
        //draw either the old v2.3 beam or the new beam
        charge = sqrt(charge); // divide evenly among trail spacing and alpha
@@@ -139,7 -139,7 +139,7 @@@ void W_Vortex_Attack(Weapon thiswep, en
  
        yoda = 0;
        damage_goodhits = 0;
 -      FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype);
 +      FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, false, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype);
  
        if(yoda && flying)
                Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
  
        actor.vortex_lasthit = damage_goodhits;
  
-       //beam and muzzle flash done on client
+       //beam done on client
+     vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
+       W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, normalize(v - w_shotorg));
        SendCSQCVortexBeamParticle(charge);
  
        W_DecreaseAmmo(thiswep, actor, myammo, weaponentity);