PathFollower doesnt fully finish the route

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

PathFollower doesnt fully finish the route

Postby Xabis » Wed Aug 21, 2019 10:09 pm

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 allExpand view
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);
   }
}
Xabis
 
Joined: 06 Mar 2013

Re: PathFollower doesnt fully finish the route

Postby _mental_ » Mon Aug 26, 2019 8:32 am

Could you post a sample to reproduce this bug?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: PathFollower doesnt fully finish the route

Postby Graf Zahl » Sat Sep 07, 2019 2:37 am

Also, you can be dead certain that changing this after more than 15 years will break older maps.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests