]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/pendulum.qc
Merge branch 'terencehill/quickmenu_file_example' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / pendulum.qc
index 503b4591d2904c5c90e5955ebd8a06edd7fca2f0..2d8aea35cfa1a756c3f7981984f772dc9b87e16e 100644 (file)
@@ -1,7 +1,7 @@
 #ifdef SVQC
 .float freq;
 void func_pendulum_controller_think()
-{
+{SELFPARAM();
        float v;
        self.nextthink = time + 0.1;
 
@@ -21,7 +21,7 @@ void func_pendulum_controller_think()
        }
 }
 
-void spawnfunc_func_pendulum()
+spawnfunc(func_pendulum)
 {
        entity controller;
        if (self.noise != "")
@@ -62,13 +62,12 @@ void spawnfunc_func_pendulum()
        self.cnt = self.angles_z;
 
        // wait for targets to spawn
-       controller = spawn();
-       controller.classname = "func_pendulum_controller";
+       controller = new(func_pendulum_controller);
        controller.owner = self;
        controller.nextthink = time + 1;
        controller.think = func_pendulum_controller_think;
-       self.nextthink = self.ltime + 999999999;
-       self.think = SUB_NullThink; // for PushMove
+       self.nextthink = self.SUB_LTIME + 999999999;
+       self.SUB_THINK = SUB_NullThink; // for PushMove
 
        //self.effects |= EF_LOWPRECISION;