bitbubbler / yet-another-dcs-server

YADS: A work in progress dcs server
The Unlicense
5 stars 3 forks source link

save waypoints between mission restarts #48

Open skeletonwburg opened 1 year ago

skeletonwburg commented 1 year ago

The current waypoints of persistent units should also be persistent over restarts.

Otherwise units on the move will stop whenever the mission or YADS is restarted. That's especially an issue for automatic respawns, because they will stop wherever they are on their way to the frontline when a restart happens.

bitbubbler commented 1 year ago

we will need to re-run this logic on restart, the unit's position is already saved. We should be able to determine the ending position as well (even if we randomize it again. https://github.com/bitbubbler/yet-another-dcs-server/blob/master/src/autoRespawn/main.ts#L225-L262

the trouble might be in determining if the unit reached the semi-random ending position? maybe we can use a fixed, known, value as the bubble to randomize and detect "done" position in and call that good enough?