Always retreat units back to LZ or starting position #3557
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to 4.2.0-beta1 a unit set to retreat at X damage would go back to the LZ in the campaign when damaged enough if no HQ was around. This got broken during repair improvements though the fix is simple: if no repair targets around, and the HQ is missing on the map, just issue a return to base order and the unit will find the LZ automatically.
Since a lot of missions take place on offworld maps where no HQ is present, it can get some players caught off guard. This fix will make saving units easier.
Similarly, mp/skirmish can benefit from this. Because RTB relies on LZ coordinates as a fail-safe, and because LZs do not exist outside campaign, the current behavior is to do nothing. I have set units to seek out the starting position coordinates in mp/skirmish to fix this. VTOLs will benefit from this should the player have no rearming pads or an HQ if they run out of ammo.