beyond-all-reason / beyond-all-reason/RecoilEngine

SpeedModifiers calculated from slopes are inverted when unit is moving in reverse

Open
#2,543 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
683
Forks
293
Avg merge
3d 2h
Merged PRs (30d)
40

Description

https://github.com/beyond-all-reason/RecoilEngine/blob/391f1fbf06f69d3ebc32e31b50fc9c65f45da0a1/rts/Sim/MoveTypes/GroundMoveType.cpp#L1298

Seems to use flatFrontDir as the "movement" vector when calculating slope mod, rather than the movement direction itself.
Should use something along the lines of a (-1)*flatFrontDir vector.
This currently results in units accelerating when climbing in reverse, and decelerating when going downhill.

Contributor guide

Open the contributing guide

Research direction

Start at rts/Sim/MoveTypes/GroundMoveType.cpp around line 1298, where the slope modifier is calculated. Compare the vector used there with the unit's actual movement direction and inspect the flatFrontDir handling. Done means reverse movement applies the correct acceleration or deceleration when climbing and descending slopes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.