From: Mario Date: Tue, 10 Oct 2017 06:02:05 +0000 (+1000) Subject: Activate targets with the correct activator/trigger when a door is opening (possible... X-Git-Tag: xonotic-v0.8.5~2455 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=34f177fc2f2d9b553f36ae37d1f6d46ab3603e29;p=xonotic%2Fxonotic-data.pk3dir.git Activate targets with the correct activator/trigger when a door is opening (possible fix for some very oddly handled CTS maps) --- diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index dc0be6ae2..392ab3e5f 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) {