X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fpendulum.qc;h=2d8aea35cfa1a756c3f7981984f772dc9b87e16e;hb=3b934631926acf4b06d969dcd361a26a3073d2c8;hp=7d3eff7c9f474a25b62975a0602e05367039598a;hpb=117fa45380851579df9e6c465a207d733f6ca748;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/pendulum.qc b/qcsrc/common/triggers/func/pendulum.qc index 7d3eff7c9..2d8aea35c 100644 --- a/qcsrc/common/triggers/func/pendulum.qc +++ b/qcsrc/common/triggers/func/pendulum.qc @@ -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,8 +62,7 @@ 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;