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

Refactor `uiGroupHandlers`

Open
#1,334 1 comment 0 reactions 0 assignees View on GitHub
refactor
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.