]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_laser.qc
remove electro beam if you get frozen
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_laser.qc
index 18715a9b4ba51ff79c7f995cd665d5a0bb1e88b5..022788adc04a8a4ccdce7b33f0d8aee02741e88e 100644 (file)
@@ -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;
@@ -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)