]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/train.qc
Get ID on the client side for func_pointparticles (doesn't fix it yet, need to invest...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / train.qc
index e02b917d1cc118cfc73c0cffea72f60790f3ee29..e7567c5009dd5fbcff1fcd9de355e4302ff1a1cf 100644 (file)
@@ -1,5 +1,8 @@
 .float train_wait_turning;
 void() train_next;
+#ifdef SVQC
+void train_use();
+#endif
 void train_wait()
 {SELFPARAM();
        WITH(entity, self, self.enemy, SUB_UseTargets());
@@ -36,7 +39,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();