From: Mario Date: Sun, 5 Mar 2017 18:00:49 +0000 (+1000) Subject: Add support for setting target2 on a trigger to give trains a new destination (potent... X-Git-Tag: xonotic-v0.8.2~131 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=193b3be9ff22cd13509e9c3c18d2b58cedc8d327;p=xonotic%2Fxonotic-data.pk3dir.git Add support for setting target2 on a trigger to give trains a new destination (potentially risky, but worth it) --- diff --git a/qcsrc/common/triggers/func/train.qc b/qcsrc/common/triggers/func/train.qc index 2e4356bab..838632b75 100644 --- a/qcsrc/common/triggers/func/train.qc +++ b/qcsrc/common/triggers/func/train.qc @@ -204,6 +204,8 @@ void train_use(entity this, entity actor, entity trigger) this.SUB_NEXTTHINK = this.SUB_LTIME + 1; SUB_THINK(this, train_next); this.use = func_null; // not again + if(trigger.target2 && trigger.target2 != "") + this.future_target = find(NULL, targetname, trigger.target2); } void func_train_find(entity this)