Page 1 of 1

PathFollower doesnt fully finish the route

Posted: Wed Aug 21, 2019 9:09 pm
by Xabis
Hello,

Looks like PathFollower doesnt fully finish the final step at the end of the route, leaving it at the previous tick's interpolation position and angle.

I fixed this in a local override for my project, but thought the dev team should be made aware.

My fix:

Code: Select all

if (Time > 1.) {
	Time -= 1.;
	bJustStepped = true;
	PrevNode = CurrNode;
	CurrNode = CurrNode.Next;
	if (CurrNode != null)
		NewNode();
	if (CurrNode == null || CurrNode.Next == null || (Options & MP_LINEAR) == 0 && CurrNode.Next.Next == null) {
		//Do final interpolation to bring follower to its true end
		Time = 1.;
		CurrNode = PrevNode;
		Interpolate();
		CurrNode = null;
		Deactivate(self);
	}
}

Re: PathFollower doesnt fully finish the route

Posted: Mon Aug 26, 2019 7:32 am
by _mental_
Could you post a sample to reproduce this bug?

Re: PathFollower doesnt fully finish the route

Posted: Sat Sep 07, 2019 1:37 am
by Graf Zahl
Also, you can be dead certain that changing this after more than 15 years will break older maps.

Re: PathFollower doesnt fully finish the route

Posted: Sun Nov 17, 2019 6:28 am
by phantombeta
Should this be closed as [Won't change] or [Can't fix]?

Re: PathFollower doesnt fully finish the route

Posted: Sun Nov 17, 2019 6:30 am
by Graf Zahl
This needs to be thorougly tested with maps that use the feature. If the fix works, it should be added, but only if we are certain that nothing will break.