]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add support for setting target2 on a trigger to give trains a new destination (potent...
authorMario <mario@smbclan.net>
Sun, 5 Mar 2017 18:00:49 +0000 (04:00 +1000)
committerMario <mario@smbclan.net>
Sun, 5 Mar 2017 18:00:49 +0000 (04:00 +1000)
qcsrc/common/triggers/func/train.qc

index 2e4356bab3214d5f124150e20975ee14056e0126..838632b750a7a97ca1a2c0e426a2fd724614e399 100644 (file)
@@ -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)