-void SUB_NullThink(void) { }
+void SUB_NullThink() { }
void() SUB_CalcMoveDone;
void() SUB_CalcAngleMoveDone;
-//void() SUB_UseTargets;
/*
==================
==================
*/
.float friction;
-void SUB_Friction (void)
+void SUB_Friction ()
{SELFPARAM();
self.SUB_NEXTTHINK = time;
if(self.SUB_FLAGS & FL_ONGROUND)
}
}
-void SUB_SetFade_Think (void)
+void SUB_SetFade_Think ()
{SELFPARAM();
- if(self.alpha == 0)
- self.alpha = 1;
- self.SUB_THINK = SUB_SetFade_Think;
- self.SUB_NEXTTHINK = time;
- self.alpha -= frametime * self.fade_rate;
- if (self.alpha < 0.01)
- SUB_VanishOrRemove(self);
+ if(this.alpha == 0)
+ this.alpha = 1;
+ this.SUB_THINK = SUB_SetFade_Think;
+ this.SUB_NEXTTHINK = time;
+ this.alpha -= frametime * this.fade_rate;
+ if (this.alpha < 0.01)
+ SUB_VanishOrRemove(this);
else
- self.SUB_NEXTTHINK = time;
+ this.SUB_NEXTTHINK = time;
}
/*
self.SUB_ORIGIN traveling at speed
===============
*/
-void SUB_CalcMoveDone (void)
+void SUB_CalcMoveDone ()
{SELFPARAM();
// After moving, set origin to exact final destination
}
.float platmovetype_turn;
-void SUB_CalcMove_controller_think (void)
+void SUB_CalcMove_controller_think ()
{SELFPARAM();
entity oldself;
float traveltime;
return;
}
- controller = spawn();
- controller.classname = "SUB_CalcMove_controller";
+ controller = new(SUB_CalcMove_controller);
controller.owner = self;
controller.platmovetype = self.platmovetype;
controller.platmovetype_start = self.platmovetype_start;
void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void() func)
{SELFPARAM();
- WITH(entity, self, ent, SUB_CalcMove(tdest, tspeedtype, tspeed, func));
+ WITHSELF(ent, SUB_CalcMove(tdest, tspeedtype, tspeed, func));
}
/*
The calling function should make sure self.SUB_THINK is valid
===============
*/
-void SUB_CalcAngleMoveDone (void)
+void SUB_CalcAngleMoveDone ()
{SELFPARAM();
// After rotating, set angle to exact final angle
self.angles = self.finalangle;
void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void() func)
{SELFPARAM();
- WITH(entity, self, ent, SUB_CalcAngleMove (destangle, tspeedtype, tspeed, func));
+ WITHSELF(ent, SUB_CalcAngleMove (destangle, tspeedtype, tspeed, func));
}