beyond-all-reason / beyond-all-reason/RecoilEngine
Make debug view handling consistent
- Dominant language
- C++
- Stars
- 683
- Forks
- 293
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
See #1555 and #1599. Various other debug views still use the "allow `/debugFoo` anytime, check for cheats in rendering code" pattern e.g.
https://github.com/beyond-all-reason/spring/blob/019ea7393c64bd00132f69d0c2de7669cdd8cad6/rts/Game/UnsyncedGameCommands.cpp#L3310
https://github.com/beyond-all-reason/spring/blob/019ea7393c64bd00132f69d0c2de7669cdd8cad6/rts/Rendering/QTPFSPathDrawer.cpp#L62
Would be good if this was consistent for all debug views. Ideally `/debugFoo 0` would be callable always (not require cheats or spectator). And ideally `/debugFoo 1` would be one of
* requires cheats to enable, but keeps rendering even if you disable cheats (so you can disable cheats e.g. when watching replay to avoid a desync)
* requires either cheats or spectator status to work and keeps rendering as long as either of the two is true. Technically you could allow setting it to 1 without restrictions (since it wouldn't do anything) but keep the automated docs generator in mind.
Contributor guide
Research direction
Start by reading issues #1555 and #1599, then inspect the debug-command handling in rts/Game/UnsyncedGameCommands.cpp around the linked line and rendering logic in rts/Rendering/QTPFSPathDrawer.cpp. Inventory the other debug views and establish a consistent policy for enabling and rendering `/debugFoo 0` and `/debugFoo 1`, including the automated documentation generator. Done means all debug views follow the agreed policy without unintended desyncs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100