From c4ec6a99ff7a06fab588b512993524b1bc46993a Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 15 Dec 2015 18:16:52 +1000 Subject: [PATCH] Add a way to pause a train until triggered again --- qcsrc/common/triggers/func/train.qc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); -- 2.39.2