-
Notifications
You must be signed in to change notification settings - Fork 0
Description
In FL if you follow a waypoint path that goes through different systems, then the waypoint set for every arrival jump point will not always be cleared. This is due to the random arrival point which may not be close enough to the waypoint in order for it to automatically clear. A solution would be to hook the function that handles the jump gate tunnel and obtain get the destination gate. With this info, loop over the waypoints and clear the waypoints targeting the destination gate. See https://github.com/FLHDE/jump-tunnel-colors/blob/1a85efdd2e9e1b7c020b47bc1780661af4f0e5e8/src/main.cpp#L50. Address 0x005037E1 can be used as the entrypoint; edx is a CSolar& and [edx+0x1B4] is the dest system and [edx+0x1B8] is the dest gate (see CSolar::get_dest_gate(void)).
Some code for the waypoint deletion:
for (int i = 0; Waypoint* waypoint = GetWaypoint(i); ++i)
{
if (waypoint->target == jumpgateDest)
{
for (; i >= 0; --i)
{
DeleteWaypoint(i);
}
break;
}
}Where DeleteWaypoint can be found at 0x4C46E0 in FL.exe.