From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 7 Feb 2023 15:34:31 +0000 (+0100) Subject: check that the entity is in fact trigger_teleport before checking for trigger_telepor... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3f7c701081748c2ddf3bd5f78605e0ef84980236;p=xonotic%2Fxonotic-data.pk3dir.git check that the entity is in fact trigger_teleport before checking for trigger_teleport spawnflags, teleport function is shared with target_teleporter --- 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))