]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_laser.qc
Merge branch 'master' into fruitiex/fruitbalance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_laser.qc
index a17f2a4c54031886124a3b2bfec6a2c9bf971fe8..00e0fff7473e2444483c7faa9bd91033a17f7336 100644 (file)
@@ -105,9 +105,11 @@ void W_Laser_Attack2 (void) // gauntlet
 {
        W_SetupShot (self, TRUE, 0, "weapons/gauntlet_fire.wav", cvar("g_balance_laser_primary_damage"));
 
-       WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_laser_primary_radius"), FALSE, self, ANTILAG_LATENCY(self));
+       WarpZone_traceline_antilag(self, w_shotorg, w_shotorg + w_shotdir * (cvar("g_balance_laser_primary_radius") + vlen(eX * self.velocity_x + eY * self.velocity_y)/5), FALSE, self, ANTILAG_LATENCY(self));
 
-       pointparticles(particleeffectnum("laser_gauntlet"), w_shotorg + w_shotdir * cvar("g_balance_laser_primary_radius"), '0 0 0', 1);
+       pointparticles(particleeffectnum("laser_gauntletmuzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+       pointparticles(particleeffectnum("laser_gauntlet"), w_shotorg + w_shotdir * (cvar("g_balance_laser_primary_radius") + vlen(eX * self.velocity_x + eY * self.velocity_y)/5), w_shotdir * 1000, 1);
+       pointparticles(particleeffectnum("laser_gauntlet"), w_shotorg + w_shotdir * (cvar("g_balance_laser_primary_radius") + vlen(eX * self.velocity_x + eY * self.velocity_y)/5) * 0.5, w_shotdir * 1000, 1);
 
        if (trace_fraction < 1)
                Damage(trace_ent, self, self, cvar("g_balance_laser_primary_damage"), WEP_LASER | HITTYPE_SECONDARY, trace_endpos, cvar("g_balance_laser_primary_force") * w_shotdir);
@@ -178,12 +180,6 @@ float w_laser(float req)
                return TRUE;
        else if (req == WR_CHECKAMMO2)
                return TRUE;
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "lasered themself to hell";
-       else if (req == WR_KILLMESSAGE)
-       {
-               w_deathtypestring = "was lasered to death by"; // unchecked: SPLASH
-       }
        return TRUE;
 };
 #endif
@@ -202,6 +198,12 @@ float w_laser(float req)
        {
                precache_sound("weapons/laserimpact.wav");
        }
+       else if (req == WR_SUICIDEMESSAGE)
+               w_deathtypestring = "lasered themself to hell";
+       else if (req == WR_KILLMESSAGE)
+       {
+               w_deathtypestring = "was lasered to death by"; // unchecked: SPLASH
+       }
        return TRUE;
 }
 #endif