X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_laser.qc;h=f743c426dfb32e0e11e9a58150d36bfea1ee6430;hb=ba7dda5ed9ea7578a88978db7c9f4294be2bf612;hp=18715a9b4ba51ff79c7f995cd665d5a0bb1e88b5;hpb=6206caf97a69286b25226a8287583e4a4598d19a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index 18715a9b4..f743c426d 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -44,11 +44,11 @@ void W_Laser_Attack (float issecondary) s_forward = v_forward * cos(a * DEG2RAD) + v_up * sin(a * DEG2RAD); if(nodamage) - W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", 0); + W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, 0); else if(issecondary == 1) - W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_secondary_damage")); + W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_secondary_damage")); else - W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_primary_damage")); + W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_primary_damage")); pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); missile = spawn (); @@ -77,6 +77,9 @@ void W_Laser_Attack (float issecondary) missile.think = W_Laser_Think; missile.nextthink = time + cvar("g_balance_laser_primary_delay"); + + other = missile; MUTATOR_CALLHOOK(EditProjectile); + if(time >= missile.nextthink) { entity oldself; @@ -136,7 +139,7 @@ void gauntletbeam_think() float dt; dt = frametime; - W_SetupShot_Range(self.owner, TRUE, 0, "", damage * dt, myradius); + W_SetupShot_Range(self.owner, TRUE, 0, "", 0, damage * dt, myradius); WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner)); // apply the damage @@ -144,8 +147,9 @@ void gauntletbeam_think() { vector force; force = w_shotdir * myforce; + if(accuracy_isgooddamage(self.owner, trace_ent)) + accuracy_add(self.owner, WEP_LASER, 0, damage * dt); Damage (trace_ent, self.owner, self.owner, damage * dt, WEP_LASER | HITTYPE_SECONDARY, trace_endpos, force * dt); - Damage_RecordDamage(self.owner, WEP_LASER | HITTYPE_SECONDARY, damage * dt); } // draw effect @@ -225,7 +229,7 @@ float w_laser(float req) if (self.BUTTON_ATCK) if (weapon_prepareattack(0, cvar("g_balance_laser_primary_refire"))) { - W_Laser_Attack(1); + W_Laser_Attack(0); weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_laser_primary_animtime"), w_ready); } if (self.BUTTON_ATCK2)