X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fbobbing.qc;h=909f5cd975c59381fc5ded443c4ae578466f35f4;hb=e9f30b97435c6afe3d6911f21e1f4fd1b97e93da;hp=f671b8ac31312419a914bd3049ecd68da2832b16;hpb=6dc9591eba337374f2b4348a6a6deaa1cb6887d0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/bobbing.qc b/qcsrc/common/triggers/func/bobbing.qc index f671b8ac3..909f5cd97 100644 --- a/qcsrc/common/triggers/func/bobbing.qc +++ b/qcsrc/common/triggers/func/bobbing.qc @@ -1,7 +1,7 @@ #ifdef SVQC .float height; void func_bobbing_controller_think() -{ +{SELFPARAM(); vector v; self.nextthink = time + 0.1; @@ -16,7 +16,7 @@ void func_bobbing_controller_think() v = self.owner.destvec + self.owner.movedir * v_forward_y; if(self.owner.classname == "func_bobbing") // don't brake stuff if the func_bobbing was killtarget'ed // * 10 so it will arrive in 0.1 sec - self.owner.velocity = (v - self.owner.origin) * 10; + self.owner.velocity = (v - self.owner.SUB_ORIGIN) * 10; } /*QUAKED spawnfunc_func_bobbing (0 .5 .8) ? X_AXIS Y_AXIS @@ -28,7 +28,7 @@ noise : path/name of looping .wav file to play. dmg : Do this mutch dmg every .dmgtime intervall when blocked dmgtime : See above. */ -void spawnfunc_func_bobbing() +spawnfunc(func_bobbing) { entity controller; if (self.noise != "") @@ -69,13 +69,12 @@ void spawnfunc_func_bobbing() return; // wait for targets to spawn - controller = spawn(); - controller.classname = "func_bobbing_controller"; + controller = new(func_bobbing_controller); controller.owner = self; controller.nextthink = time + 1; controller.think = func_bobbing_controller_think; - self.nextthink = self.ltime + 999999999; - self.think = SUB_NullThink; // for PushMove + self.SUB_NEXTTHINK = self.SUB_LTIME + 999999999; + self.SUB_THINK = SUB_NullThink; // Savage: Reduce bandwith, critical on e.g. nexdm02 self.effects |= EF_LOWPRECISION;