self.think1 ();
}
+.float bezier_turn;
void SUB_CalcMove_controller_think (void)
{
entity oldself;
veloc = veloc * (1 / sys_frametime); // so it arrives for the next frame
}
self.owner.velocity = veloc;
- self.owner.angles = vectoangles(delta + 2 * delta2 * phasepos);
+ if(self.owner.bezier_turn)
+ self.owner.angles = vectoangles(delta + 2 * delta2 * phasepos);
self.nextthink = nexttick;
} else {
// derivative: delta + 2 * delta2 (e.g. for angle positioning)
{
// if using bezier curves and turning is enabled, the train will turn toward the next point while waiting
if(!self.train_wait_turning)
- if (self.spawnflags & 1 && self.wait >= 0)
+ if (self.spawnflags & 1 && self.bezier_turn && self.wait >= 0)
{
entity targ;
targ = find(world, targetname, self.target);
objerror("func_train without a target");
if (!self.speed)
self.speed = 100;
+ if (self.spawnflags & 2)
+ self.bezier_turn = TRUE;
if not(InitMovingBrushTrigger())
return;