X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fdoor.qc;h=bb15503c7f801686a3a1ee3af473de786923fc3c;hp=dc0be6ae24a9822b67865e2c4a2cb0c6b0b32c6b;hb=d865de7a9a17c5a1d9286aec40f68c3530697660;hpb=46f1ac4e74d212b95d3e2d08d36393a14a8e5cb7 diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index dc0be6ae24..bb15503c7f 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) { @@ -765,6 +765,7 @@ spawnfunc(func_door) if (this.health) { + //this.canteamdamage = true; // TODO this.takedamage = DAMAGE_YES; this.event_damage = door_damage; }