From 34f177fc2f2d9b553f36ae37d1f6d46ab3603e29 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 10 Oct 2017 16:02:05 +1000 Subject: [PATCH] Activate targets with the correct activator/trigger when a door is opening (possible fix for some very oddly handled CTS maps) --- qcsrc/common/triggers/func/door.qc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index dc0be6ae24..392ab3e5f5 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -22,7 +22,7 @@ THINK FUNCTIONS */ void door_go_down(entity this); -void door_go_up(entity this); +void door_go_up(entity this, entity actor, entity trigger); void door_rotating_go_down(entity this); void door_rotating_go_up(entity this, entity oth); @@ -59,7 +59,7 @@ void door_blocked(entity this, entity blocker) if (this.state == STATE_DOWN) if (this.classname == "door") { - door_go_up (this); + door_go_up (this, NULL, NULL); } else { door_rotating_go_up(this, blocker); @@ -123,7 +123,7 @@ void door_go_down(entity this) SUB_CalcMove (this, this.pos1, TSPEED_LINEAR, this.speed, door_hit_bottom); } -void door_go_up(entity this) +void door_go_up(entity this, entity actor, entity trigger) { if (this.state == STATE_UP) return; // already going up @@ -142,7 +142,7 @@ void door_go_up(entity this) string oldmessage; oldmessage = this.message; this.message = ""; - SUB_UseTargets(this, NULL, NULL); + SUB_UseTargets(this, actor, trigger); this.message = oldmessage; } @@ -237,7 +237,7 @@ void door_fire(entity this, entity actor, entity trigger) entity e = this; do { if (e.classname == "door") { - door_go_up(e); + door_go_up(e, actor, trigger); } else { // if the BIDIR spawnflag (==2) is set and the trigger has set trigger_reverse, reverse the opening direction if ((e.spawnflags & 2) && trigger.trigger_reverse!=0 && e.lip != 666 && e.state == STATE_BOTTOM) { -- 2.39.2