From a474b820e2e3bad2454921a88219f2215a09570b Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sat, 7 May 2022 21:02:49 -0700 Subject: [PATCH] momentary_rot_button: Fix DOORHACK, it's spawnflag is apparently set by the affected and not the ent controlling it. --- src/gs-entbase/server/momentary_rot_button.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gs-entbase/server/momentary_rot_button.qc b/src/gs-entbase/server/momentary_rot_button.qc index ce6ae23a..bd0298b4 100644 --- a/src/gs-entbase/server/momentary_rot_button.qc +++ b/src/gs-entbase/server/momentary_rot_button.qc @@ -25,7 +25,7 @@ in use. It affects momentary_door. "returnspeed" : Speed at which it returns to its original position. -------- SPAWNFLAGS -------- -MRBFL_DOORHACK : Unimplemented. +MRBFL_DOORHACK : This entity will move along with another momentary_rot_button of the same name. MRBFL_NOTUSE : Don't allow interaction via "use" key/button. MRBFL_AUTORETURN : Rotate back to its original state when not being used. MRBFL_XAXIS : Rotate along the X-axis. @@ -161,9 +161,9 @@ momentary_rot_button::OnPlayerUse(void) for (entity e = world; (e = find(e, ::targetname, targetname));) { CBaseMomentary b = (CBaseMomentary)e; - + /* door hack: any entity with the same name as ours will follow our states */ - if (HasSpawnFlags(MRBFL_DOORHACK)) + if (b.HasSpawnFlags(MRBFL_DOORHACK)) b.SetMoveState(iEndState); } }