Skip to content

Smooth polyobject movement and other cleanup

MascaraSnake requested to merge more-polyobject-cleanup into next

Polyobject waypoint movement is imprecise in the following ways:

  • The polyobject is allowed to overshoot the waypoint it's aiming for, as long as it doesn't end up further away from the waypoint than it was before. If this happens, the polyobject will waste the next tic correcting the overshoot. If the polyobject is fast enough, this will produce a noticeable "jittering" effect. srb20037
  • If the polyobject reaches its current target waypoint, it will look for the next one and start moving towards it in the same tic. This movement happens at full speed and doesn't account for the distance the polyobject has already crossed in this tic (it doesn't account for overshooting either). This can cause the polyobject to temporarily speed up as it moves past a waypoint.

This branch corrects these problems. Overshooting is no longer allowed, and the distance that was already crossed in this tic is taken into account when rerouting towards the next waypoint. Movement should now be smooth in all situations (barring unavoidable rounding errors). I also cleaned up the polyobject waypoint code in general.

Based on !938 (merged), so look at that one first.

waypoints.wad srb2win-polyobjects.exe

Merge request reports