]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/misc/laser.qc
Use SELFPARAM() in every function that uses self
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / misc / laser.qc
index a7fb07815356973eee23bdee3c88a0878f312434..5dde1b4fac63001264a963255a3f83800f555966 100644 (file)
@@ -11,7 +11,7 @@
 #ifdef SVQC
 .float modelscale;
 void misc_laser_aim()
-{
+{SELFPARAM();
        vector a;
        if(self.enemy)
        {
@@ -50,14 +50,14 @@ void misc_laser_aim()
 }
 
 void misc_laser_init()
-{
+{SELFPARAM();
        if(self.target != "")
                self.enemy = find(world, targetname, self.target);
 }
 
 .entity pusher;
 void misc_laser_think()
-{
+{SELFPARAM();
        vector o;
        entity oldself;
        entity hitent;
@@ -131,7 +131,7 @@ void misc_laser_think()
 }
 
 float laser_SendEntity(entity to, float fl)
-{
+{SELFPARAM();
        WriteByte(MSG_ENTITY, ENT_CLIENT_LASER);
        fl = fl - (fl & 0xF0); // use that bit to indicate finite length laser
        if(self.spawnflags & 2)
@@ -196,14 +196,14 @@ Keys:
  damage per second (-1 for a laser that kills immediately)
 */
 void laser_use()
-{
+{SELFPARAM();
        self.state = !self.state;
        self.SendFlags |= 4;
        misc_laser_aim();
 }
 
 void laser_reset()
-{
+{SELFPARAM();
        if(self.spawnflags & 1)
                self.state = 1;
        else
@@ -211,7 +211,7 @@ void laser_reset()
 }
 
 void spawnfunc_misc_laser()
-{
+{SELFPARAM();
        if(self.mdl)
        {
                if(self.mdl == "none")
@@ -280,7 +280,7 @@ class(Laser) .float scale; // scaling factor of the thickness
 class(Laser) .float modelscale; // scaling factor of the dlight
 
 void Draw_Laser()
-{
+{SELFPARAM();
        if(!self.state)
                return;
        InterpolateOrigin_Do();
@@ -331,7 +331,7 @@ void Draw_Laser()
 }
 
 void Ent_Laser()
-{
+{SELFPARAM();
        InterpolateOrigin_Undo();
 
        // 30 bytes, or 13 bytes for just moving