From 1c009a189e150b8ca30c1f7f3bf9d43a40525430 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 16 Jan 2019 05:17:52 +0100 Subject: [PATCH] func_door_rotating: Lock doors when a targetname is set, as doors then can only be opened by triggers --- Source/gs-entbase/server/func_door_rotating.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/gs-entbase/server/func_door_rotating.cpp b/Source/gs-entbase/server/func_door_rotating.cpp index 89da2874..88d19e68 100644 --- a/Source/gs-entbase/server/func_door_rotating.cpp +++ b/Source/gs-entbase/server/func_door_rotating.cpp @@ -23,6 +23,7 @@ class func_door_rotating:CBaseTrigger int m_iMoveSnd; int m_iStopSnd; int m_iDamage; + int m_iLocked; float m_flDistance; float m_flSpeed; float m_flLip; @@ -188,6 +189,10 @@ void func_door_rotating::Touch(void) return; } + if (m_iLocked) { + return; + } + if (other.movetype == MOVETYPE_WALK) { if (other.absmin[2] <= maxs[2] - 2) { eActivator = other; @@ -296,6 +301,10 @@ void func_door_rotating::Respawn(void) //m_vecMoveDir = m_vecMoveDir * -1; } + if (m_strTargetName) { + m_iLocked = TRUE; + } + angles = m_vecPos1; }