Skip to content

Feature-flag cleanup: remove stale USE_BANS, USE_TESS_NEEDS_*, USE_STB_TRUETYPE#259

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-3cc5
Draft

Feature-flag cleanup: remove stale USE_BANS, USE_TESS_NEEDS_*, USE_STB_TRUETYPE#259
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/feature-flag-cleanup-3cc5

Conversation

@cursor

@cursor cursor Bot commented Jun 13, 2026

Copy link
Copy Markdown

Summary

Removes stale feature flags and dead gated branches that were already inactive or never wired into the build. No intentional behavior change on the active code paths.

Flags removed

Flag / cvar Why safe to delete
USE_STB_TRUETYPE Passed from compile_engine.sh and CI but never referenced in CMakeLists.txt — pure ghost CMake flag.
USE_BANS Preprocessor macro was never defined anywhere; ~650 lines of ban commands, file I/O, and connect-time checks were dead code. Auth-server banUser/banClient hooks were inside the same never-compiled block.
USE_TESS_NEEDS_NORMAL / USE_TESS_NEEDS_ST2 Defines in tr_local.h were already commented out, so all conditional branches were inactive. Tessellation already followed the always-on copy path (normals + ST2).
USE_OPENVDB Never defined at build time. VDB loader is NanoVDB-only; removed misleading "compile with USE_OPENVDB" startup/failure messaging.
cg_stereoSeparation Deprecated ROM cvar with no remaining consumers; registration removed from client init.

Behavioral parity checks

  • ./scripts/compile_engine.sh vulkanRelease build succeeded (GCC/Clang path via default script)
  • ./scripts/smoke_test.sh17/17 passed (binary checks, server startup, shader validation, compatibility guards)
  • Server ban/connect path unchanged (ban system was never compiled in)
  • Renderer tessellation unchanged (active path was already unconditional)

Follow-up candidates (not in this PR — lower confidence or larger scope)

  • Flatten always-on USE_VK_PBR / USE_VBO / USE_FOG_COLLAPSE defines in tr_local.h (~30 renderer files)
  • Remove USE_VULKAN=OFF CMake option (already fatal-errors)
  • Deprecate runtime cvars with live 0 branches (r_forwardPlus, r_fbo, etc.) per docs/DEPRECATION_POLICY.md
Open in Web View Automation 

- Drop ghost USE_STB_TRUETYPE from compile_engine.sh and CI (never read by CMake)
- Remove never-compiled USE_BANS server ban system and auth-server hooks
- Flatten dead USE_TESS_NEEDS_* renderer gates (defines were already commented out)
- Simplify VDB init to NanoVDB-only messaging (USE_OPENVDB never defined)
- Remove deprecated cg_stereoSeparation ROM cvar registration

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant