]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/train.qc
Replace all direct assignments to self with setself(e)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / train.qc
index f6059f74c8bc117e53e2a97b4a4b569b565c89d5..d06efdd9437fbfaced138e0f5a83f8a22646dff5 100644 (file)
@@ -2,11 +2,8 @@
 void() train_next;
 void train_wait()
 {SELFPARAM();
-       entity oldself;
-       oldself = self;
-       self = self.enemy;
-       SUB_UseTargets();
-       self = oldself;
+       SELFCALL(self.enemy, SUB_UseTargets());
+       SELFCALL_DONE();
        self.enemy = world;
 
        // if turning is enabled, the train will turn toward the next point while waiting