beyond-all-reason / beyond-all-reason/RecoilEngine
Setting high wanted fly height for planes landing vertically freezes them mid-air
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
### Bug
When a plane is landing and moving down straight down vertically, setting its wanted flight height to something higher than its current height causes it to freeze mid-air.
### Reproduction
Take the commit at the top of https://github.com/ZeroK-RTS/Zero-K/tree/wanted-height-landing-bug and follow the instructions in the commit message.
### Correct behaviour
Desired flying height shouldn't matter at all when the unit is not flying but landing, but I assume ripping it out of the math could subtly break things so I would be happy enough with some minimal hax for the plane to just not be stuck.
### Extra info
I think the relevant code would be this chunk:
https://github.com/beyond-all-reason/RecoilEngine/blob/3b51258e062de8f4a8906ad311111d4102cb10c9/rts/Sim/MoveTypes/StrafeAirMoveType.cpp#L1001-L1039
Contributor guide
Research direction
Reproduce the landing case using the wanted-height-landing-bug commit and its instructions. Then inspect rts/Sim/MoveTypes/StrafeAirMoveType.cpp around lines 1001-1039, focusing on how wanted flight height affects vertically landing planes. Done means a plane with a wanted height above its current height no longer freezes mid-air while landing, with the relevant behavior covered by an appropriate test or reproduction check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100