From: Mario Date: Tue, 15 Dec 2015 08:16:52 +0000 (+1000) Subject: Add a way to pause a train until triggered again X-Git-Tag: xonotic-v0.8.2~1493 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c4ec6a99ff7a06fab588b512993524b1bc46993a;p=xonotic%2Fxonotic-data.pk3dir.git Add a way to pause a train until triggered again --- diff --git a/qcsrc/common/triggers/func/train.qc b/qcsrc/common/triggers/func/train.qc index e02b917d1..909b8f5e8 100644 --- a/qcsrc/common/triggers/func/train.qc +++ b/qcsrc/common/triggers/func/train.qc @@ -36,7 +36,17 @@ void train_wait() stopsoundto(MSG_BROADCAST, self, CH_TRIGGER_SINGLE); // send this as unreliable only, as the train will resume operation shortly anyway #endif - if(self.wait < 0 || self.train_wait_turning) // no waiting or we already waited while turning +#ifdef SVQC + entity tg = find(world, targetname, self.target); + if(tg.spawnflags & 4) + { + self.use = train_use; + self.SUB_THINK = func_null; + self.SUB_NEXTTHINK = 0; + } + else +#endif + if(self.wait < 0 || self.train_wait_turning) // no waiting or we already waited while turning { self.train_wait_turning = false; train_next();