beyond-all-reason / beyond-all-reason/RecoilEngine
Refactor `uiGroupHandlers`
- Dominant language
- C++
- Stars
- 683
- Forks
- 293
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
Right now this is an array of group handlers indexed by `teamID`. There's two broad users, one is the skirmish AI interface which indexes it with given AI's team, and the rest is most of the player-facing UI which indexes it with `gu->myTeam`.
Change this into one standalone grouphandler for the player UI (everywhere it's `gu->myTeam` currently) and have the array indexed by AI ID. This way player units won't lose group when changing teams (capture, dynamic comshare) and players/AIs that happen to be on the same team won't interfere with each other's groups.
Somewhat related: #1099
Contributor guide
Research direction
Locate the uiGroupHandlers declaration and every use of gu->myTeam and AI-team indexing. Trace both the player-facing UI and skirmish AI paths, then verify that player groups survive team changes and that players and AIs on the same team keep independent groups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100