From 3f7c701081748c2ddf3bd5f78605e0ef84980236 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 7 Feb 2023 16:34:31 +0100 Subject: [PATCH] check that the entity is in fact trigger_teleport before checking for trigger_teleport spawnflags, teleport function is shared with target_teleporter --- qcsrc/common/mapobjects/trigger/teleport.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/mapobjects/trigger/teleport.qc b/qcsrc/common/mapobjects/trigger/teleport.qc index 42e1bd24f..e6da12a34 100644 --- a/qcsrc/common/mapobjects/trigger/teleport.qc +++ b/qcsrc/common/mapobjects/trigger/teleport.qc @@ -28,7 +28,7 @@ bool Teleport_Active(entity this, entity player) if(IS_TURRET(player)) return false; - if((this.spawnflags & TELEPORT_SPECTATOR) && !IS_SPEC(player)) + if(this.classname == "trigger_teleport" && this.spawnflags & TELEPORT_SPECTATOR && !IS_SPEC(player)) return false; #elif defined(CSQC) if(!IS_PLAYER(player)) -- 2.39.2