]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/teleport.qc
Merge branch 'terencehill/lms_itemtimes_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / teleport.qc
index 48b0341d33c832315133470715c668d844fd6b4c..e289064c8b0413b1af161b3e7858659dc038741f 100644 (file)
@@ -26,9 +26,12 @@ void Teleport_Touch ()
 
        if(IS_TURRET(other))
                return;
+#elif defined(CSQC)
+       if(!IS_PLAYER(other))
+               return;
 #endif
 
-       if(PHYS_DEAD(other))
+       if(IS_DEAD(other))
                return;
 
        if(self.team)
@@ -83,6 +86,9 @@ spawnfunc(trigger_teleport)
        trigger_init(self);
        self.use = trigger_teleport_use;
 
+       if(self.noise != "")
+               FOREACH_WORD(self.noise, true, LAMBDA(precache_sound(it)));
+
        // this must be called to spawn the teleport waypoints for bots
        InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);