X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Frotating.qc;h=3f481ae78f4d30ec5dff0c2394efca09bf8717c1;hb=bf28c62f9ad2f130024109354c2503457195898d;hp=93d4a30cedaa14ee2de8078890f9e29a8cc025d3;hpb=99c1b6ca80a69e112d410ee493d62f757b2c6df8;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/rotating.qc b/qcsrc/common/triggers/func/rotating.qc index 93d4a30ce..3f481ae78 100644 --- a/qcsrc/common/triggers/func/rotating.qc +++ b/qcsrc/common/triggers/func/rotating.qc @@ -1,21 +1,20 @@ #ifdef SVQC -void func_rotating_setactive(float astate) +void func_rotating_setactive(entity this, int astate) { - if (astate == ACTIVE_TOGGLE) { - if(self.active == ACTIVE_ACTIVE) - self.active = ACTIVE_NOT; + if(this.active == ACTIVE_ACTIVE) + this.active = ACTIVE_NOT; else - self.active = ACTIVE_ACTIVE; + this.active = ACTIVE_ACTIVE; } else - self.active = astate; + this.active = astate; - if(self.active == ACTIVE_NOT) - self.avelocity = '0 0 0'; + if(this.active == ACTIVE_NOT) + this.avelocity = '0 0 0'; else - self.avelocity = self.pos1; + this.avelocity = this.pos1; } /*QUAKED spawnfunc_func_rotating (0 .5 .8) ? - - X_AXIS Y_AXIS @@ -26,7 +25,7 @@ dmg : Do this mutch dmg every .dmgtime intervall when blocked dmgtime : See above. */ -void spawnfunc_func_rotating() +spawnfunc(func_rotating) { if (self.noise != "") {