]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/teleport.qc
q3df teleporter flags
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / teleport.qc
index ae82a82c1003a8b5da7f8e4e084143a919d5e770..0ac4559ccb4a80228ca88102ef1c5f1c833e11c9 100644 (file)
@@ -39,6 +39,10 @@ bool Teleport_Active(entity this, entity player)
                if(((this.spawnflags & INVERT_TEAMS) == 0) == (DIFF_TEAM(this, player)))
                        return false;
 
+       // no need to call IS_OBSERVER(), observers never call use/touch functions which means this is never an observer
+       if(this.classname == "trigger_teleport" && this.spawnflags & TELEPORT_OBSERVERS_ONLY)
+               return false;
+
        return true;
 }