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

flankingBonusDir should be normalized on parsing

Open Beginner friendly
#1,964 4 comments 1 reaction 0 assignees View on GitHub
good first issue
Dominant language
C++
Stars
679
Forks
290
Avg merge
3d 2h
Merged PRs (30d)
40

Description

The damage calculation on https://github.com/beyond-all-reason/spring/blob/8e9cd08bb98111b76a723b55b23954789942eddf/rts/Sim/Units/Unit.cpp#L1179 expects a normalized vector.

Proposed fix is to normalize the vector when parsed on https://github.com/beyond-all-reason/spring/blob/8e9cd08bb98111b76a723b55b23954789942eddf/rts/Sim/Units/UnitDef.cpp#L454

Contributor guide

Open the contributing guide

Research direction

Start at rts/Sim/Units/UnitDef.cpp around line 454, where flankingBonusDir is parsed, then inspect rts/Sim/Units/Unit.cpp around line 1179 to confirm the damage calculation expects a normalized vector. Done means the parsed flankingBonusDir is normalized before the calculation uses it.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.