From 42414ef1f70f0e8a24dbb974e8aa660f1c0f4c22 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 13 Oct 2015 06:28:25 +1000 Subject: [PATCH] Add an extra spawnflag to func_train to replicate original (Quake 1) behaviour (only starting moves when triggered) --- qcsrc/common/triggers/func/train.qc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/triggers/func/train.qc b/qcsrc/common/triggers/func/train.qc index a75ac4192..65414548b 100644 --- a/qcsrc/common/triggers/func/train.qc +++ b/qcsrc/common/triggers/func/train.qc @@ -161,6 +161,13 @@ void train_link() //Net_LinkEntity(self, 0, false, train_send); } +void train_use() +{ + self.SUB_NEXTTHINK = self.SUB_LTIME + 1; + self.SUB_THINK = train_next; + self.use = func_null; // not again +} + void func_train_find() {SELFPARAM(); entity targ; @@ -169,8 +176,12 @@ void func_train_find() if (self.target == "") objerror("func_train_find: no next target"); SUB_SETORIGIN(self, targ.origin - self.view_ofs); - self.SUB_NEXTTHINK = self.SUB_LTIME + 1; - self.SUB_THINK = train_next; + + if(!(self.spawnflags & 4)) + { + self.SUB_NEXTTHINK = self.SUB_LTIME + 1; + self.SUB_THINK = train_next; + } train_link(); } @@ -197,6 +208,9 @@ spawnfunc(func_train) return; self.effects |= EF_LOWPRECISION; + if(self.spawnflags & 4) + self.use = train_use; + if (self.spawnflags & 2) { self.platmovetype_turn = true; -- 2.39.2