beyond-all-reason / beyond-all-reason/RecoilEngine
Setting maxSpeed <0 isn't possible to force reverse move
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
https://github.com/beyond-all-reason/RecoilEngine/blob/391f1fbf06f69d3ebc32e31b50fc9c65f45da0a1/rts/Sim/MoveTypes/GroundMoveType.cpp#L3609
This suggests you left the possibility to "force" a reverse move without any kind of ETA calculation.
But:
https://github.com/beyond-all-reason/RecoilEngine/blob/2d9644dd923d09c7c12892a64622cc71319904b3/rts/Sim/MoveTypes/MoveType.h#L49
Makes it impossible to actually set it to a < 0 value.
I understand from the comments just before that allowing < 0 values might be problematic which is why it is clamped so i would suggest using a different tag bool forceReverse instead of the current method, so maxSpeed can remain positive and untouched.
That is if the possibility to force reverse was left on purpose.
Contributor guide
Research direction
Read the movement logic at rts/Sim/MoveTypes/GroundMoveType.cpp around line 3609 and the maxSpeed definition in rts/Sim/MoveTypes/MoveType.h around line 49. Determine whether reverse forcing is intentional and how the clamp affects it. Done means the chosen behavior is possible without making maxSpeed negative, with the relevant movement behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100