]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_triggers.qc
get rid of SUB_Null
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_triggers.qc
index ab12fc326569d45f164c4f7d4e6ca2863e4886a0..10a78fb99dfe0230943211b4f259c47f7a7f2185 100644 (file)
@@ -192,7 +192,7 @@ void multi_trigger()
        else
        {       // we can't just remove (self) here, because this is a touch function
                // called wheil C code is looping through area links...
-               self.touch = SUB_Null;
+               self.touch = func_null;
        }
 }
 
@@ -254,7 +254,7 @@ void multi_reset()
                self.takedamage = DAMAGE_YES;
                self.solid = SOLID_BBOX;
        }
-       self.think = SUB_Null;
+       self.think = func_null;
        self.team = self.team_saved;
 }
 
@@ -359,7 +359,7 @@ void delay_use()
 
 void delay_reset()
 {
-       self.think = SUB_Null;
+       self.think = func_null;
 }
 
 void spawnfunc_trigger_delay()
@@ -548,6 +548,7 @@ void trigger_heal_touch()
        if (other.iscreature)
        {
                if (other.takedamage)
+               if (!other.deadflag)
                if (other.triggerhealtime < time)
                {
                        EXACTTRIGGER_TOUCH;
@@ -1393,6 +1394,8 @@ void trigger_impulse_touch1()
         return;
     }
 
+    str = min(self.radius, vlen(self.origin - other.origin));
+
     if(self.falloff == 1)
         str = (str / self.radius) * self.strength;
     else if(self.falloff == 2)