- cp = find(world, target, targ.targetname); // get the previous corner first
- cp = find(world, targetname, cp.target2); // now get its second target
- if(!cp)
+ if(targ.curve)
{
- // if using bezier curves, you must have a control point for each corner in the train's path
- if(autocvar_developer)
- dprint("Warning: func_train using beizer curves reached a path_corner without a control point. Please add a target2 for each path_corner used by this train!");
- cp = targ; // assume a straight line to the destination as fallback
+ cp = find(world, targetname, targ.curve); // get its second target (the control point)
+ cp_org = cp.origin - self.mins; // no control point found, assume a straight line to the destination