self.enemy = world;
// if turning is enabled, the train will turn toward the next point while waiting
- if(self.bezier_turn && !self.train_wait_turning)
+ if(self.platmovetype_turn && !self.train_wait_turning)
{
entity targ, cp;
vector org;
targ = find(world, targetname, self.target);
- if(self.spawnflags & 1 && targ.curve)
- cp = find(world, targetname, targ.curve);
+ if((self.spawnflags & 1) && targ.curvetarget)
+ cp = find(world, targetname, targ.curvetarget);
else
cp = world;
if(cp) // bezier curves movement
- org = normalize(cp.origin - self.origin); // use the origin of the control point of the next path_corner
+ org = vectoangles(cp.origin - self.origin); // use the origin of the control point of the next path_corner
else // linear movement
- org = normalize(targ.origin - self.origin); // use the origin of the next path_corner
+ org = vectoangles(targ.origin - self.origin); // use the origin of the next path_corner
if(self.wait >= 0) // slow turning
{
return;
}
else // instant turning
- {
- self.angles = vectoangles(org - self.origin);
- }
+ self.angles = org;
}
if(self.noise != "")
self.target = targ.target;
if (self.spawnflags & 1)
{
- if(targ.curve)
+ if(targ.curvetarget)
{
- cp = find(world, targetname, targ.curve); // get its second target (the control point)
+ cp = find(world, targetname, targ.curvetarget); // get its second target (the control point)
cp_org = cp.origin - self.mins; // no control point found, assume a straight line to the destination
}
else
if (!self.speed)
self.speed = 100;
if (self.spawnflags & 2)
- self.bezier_turn = TRUE;
+ self.platmovetype_turn = TRUE;
if not(InitMovingBrushTrigger())
return;