X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_laser.qc;h=00e0fff7473e2444483c7faa9bd91033a17f7336;hp=4d749d0ba1c36bdcdc792883cee07b0d1652cc0e;hb=8a13a6d2d6e42485015dee9c1c910e6ed9b46cdf;hpb=2ef908ed0fef3660c024e7943863a98dc94fe398 diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 4d749d0ba..00e0fff74 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -1,6 +1,7 @@ #ifdef REGISTER_WEAPON REGISTER_WEAPON(LASER, w_laser, 0, 1, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "laser", "laser", "Laser"); #else +#ifdef SVQC void(float imp) W_SwitchWeapon; void W_Laser_Touch (void) @@ -104,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); @@ -177,6 +180,24 @@ float w_laser(float req) return TRUE; else if (req == WR_CHECKAMMO2) return TRUE; + return TRUE; +}; +#endif +#ifdef CSQC +float w_laser(float req) +{ + if(req == WR_IMPACTEFFECT) + { + vector org2; + org2 = w_org + w_backoff * 6; + pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1); + if(!w_issilent) + sound(self, CHAN_PROJECTILE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); + } + else if(req == WR_PRECACHE) + { + precache_sound("weapons/laserimpact.wav"); + } else if (req == WR_SUICIDEMESSAGE) w_deathtypestring = "lasered themself to hell"; else if (req == WR_KILLMESSAGE) @@ -184,5 +205,6 @@ float w_laser(float req) w_deathtypestring = "was lasered to death by"; // unchecked: SPLASH } return TRUE; -}; +} +#endif #endif