Ship distance to waypoint should be calculated from their origin

Issue #178 resolved
Random created an issue

One problem I encountered in Bonus 6 (MAX103A) is that the CRS hypers out way too soon, only a few minutes into the mission rather than around ~12 minutes in. When you target the CRS, the displayed time to destination in the CMD is accurate to the original game (both to waypoint 1, and next to the hyperspace point) but in XWVM they reach their destination far sooner than they should.

XWVM appears to be calculating their distance from the nose of the ship to the waypoint, rather than their center origin. So longer ships like a CRS (or STD) will jump far sooner than they should.

Testing in the original, the actual distance to waypoints seems to be calculated from the origin. Reaching a waypoint is triggered when this distance is within a certain proximity radius.

Fighters, TRN, SHU, TUG, and CRV have a waypoint proximity of 400 meters.
CRS, STD, FRG have a proximity of 200 meters.

For hyperspace points, it appears all craft have a proximity range of 400 meters before they begin accelerating into hyperspace.

Edit: there may be some differences in proximity with different orders, especially when multiple waypoints are considered. Need further testing on that. But those ranges will work correctly for the same order and single waypoint used in Bonus 6.

Comments (2)

  1. Log in to comment