]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/rotating.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / rotating.qc
index 2474f318170178d8b1c61fa23b74854e3b9a145c..3f481ae78f4d30ec5dff0c2394efca09bf8717c1 100644 (file)
@@ -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 != "")
        {
@@ -69,8 +68,8 @@ void spawnfunc_func_rotating()
     self.blocked = generic_plat_blocked;
 
        // wait for targets to spawn
-       self.nextthink = self.ltime + 999999999;
-       self.think = SUB_NullThink; // for PushMove
+       self.SUB_NEXTTHINK = self.SUB_LTIME + 999999999;
+       self.SUB_THINK = SUB_NullThink; // for PushMove
 
        // TODO make a reset function for this one
 }