]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/misc/laser.qc
Merge branch 'Mario/dmg_wepent'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / misc / laser.qc
index 15c7e26301daed6d06699502447e5bfb9fa2eeed..45bd21fd1b15cd32eda5a9b170fa0732711b7029 100644 (file)
@@ -1,3 +1,4 @@
+#include "laser.qh"
 #if defined(CSQC)
        #include <lib/csqcmodel/interpolate.qh>
        #include <client/main.qh>
@@ -52,7 +53,7 @@ void misc_laser_aim(entity this)
 void misc_laser_init(entity this)
 {
        if(this.target != "")
-               this.enemy = find(world, targetname, this.target);
+               this.enemy = find(NULL, targetname, this.target);
 }
 
 .entity pusher;
@@ -117,7 +118,7 @@ void misc_laser_think(entity this)
                        if(((this.spawnflags & 8) == 0) == (this.team != hitent.team))
                                return;
                if(hitent.takedamage)
-                       Damage(hitent, this, this, ((this.dmg < 0) ? 100000 : (this.dmg * frametime)), DEATH_HURTTRIGGER.m_id, hitloc, '0 0 0');
+                       Damage(hitent, this, this, ((this.dmg < 0) ? 100000 : (this.dmg * frametime)), DEATH_HURTTRIGGER.m_id, DMG_NOWEP, hitloc, '0 0 0');
        }
 }
 
@@ -377,5 +378,6 @@ NET_HANDLE(ENT_CLIENT_LASER, bool isnew)
 
        InterpolateOrigin_Note(this);
        this.draw = Draw_Laser;
+       if (isnew) IL_PUSH(g_drawables, this);
 }
 #endif