diff --git a/src/gs-entbase/server/func_door.qc b/src/gs-entbase/server/func_door.qc index 273103fb..b7883878 100644 --- a/src/gs-entbase/server/func_door.qc +++ b/src/gs-entbase/server/func_door.qc @@ -156,14 +156,6 @@ func_door::Arrived(void) sound(this, CHAN_VOICE, "common/null.wav", 1.0f, ATTN_NORM); } - if (targetClose) - for (entity f = world; (f = find(f, ::targetname, targetClose));) { - NSEntity trigger = (NSEntity)f; - if (trigger.Trigger != __NULL__) { - trigger.Trigger(this, TRIG_TOGGLE); - } - } - if (!(spawnflags & SF_MOV_USE)) { touch = Touch; } @@ -184,6 +176,14 @@ func_door::Returned(void) velocity = [0,0,0]; nextthink = 0.0f; + if (targetClose) + for (entity f = world; (f = find(f, ::targetname, targetClose));) { + NSEntity trigger = (NSEntity)f; + if (trigger.Trigger != __NULL__) { + trigger.Trigger(this, TRIG_TOGGLE); + } + } + if (m_strSndStop) { Sound_Play(this, CHAN_VOICE, m_strSndStop); } else {