Skip to content

Improve Source 2 hook resilience across CS2 updates - #1194

Merged
dtugend merged 2 commits into
advancedfx:mainfrom
rechedev9:codex/hlae-resilient-optional-hooks
Jul 10, 2026
Merged

dtugend merged 2 commits into
advancedfx:mainfrom
rechedev9:codex/hlae-resilient-optional-hooks

Conversation

@rechedev9

Copy link
Copy Markdown
Contributor

Supersedes #1192, which was automatically closed when its cs2-update base branch was deleted.
Related to #1186.

Why this shape

CS2 updates can invalidate several independent reverse-engineered addresses in one release.
Treating every address as equally critical lets a break in a cosmetic or optional path prevent unrelated recording and camera hooks from loading.
That failure boundary is too broad: a partial compatibility regression becomes a total one even when the requested workflow never uses the affected capability.

This change keeps the failure boundary around the capability that owns the missing address.
Capture-critical hooks still fail fast.
Optional end-of-match suppression and decorated-name replacement instead leave the rest of AfxHookSource2 available and emit explicit warnings.
The warnings are intentional: continuing silently would make the next game update harder to diagnose, while a modal error makes automated capture impossible despite the core hook remaining usable.

Panorama style symbols have a different resilience problem.
Walking Panorama's private CUtlMap couples normal opacity operations to both an address signature and an internal container layout.
The July update demonstrated that the storage can move or be inlined even when Panorama's lookup behavior remains available.
Asking Panorama's own resolver to perform normal lookup keeps ownership of that private layout inside Panorama.
The map remains available for diagnostics and as a fallback, so __mirv_panorama_dump_style_symbols is preserved on builds where the container can still be located.
HLAE still stops Panorama hook installation when neither route is available, because proceeding in that state would make style operations incorrect rather than merely disable an optional feature.

The scope is deliberately limited to resilience behavior on top of the CS2 fixes now merged into main.
It does not duplicate or claim the signatures and offsets credited in #1186, and it does not include downstream packaging, binaries, or recorder behavior.

Validation

  • cmake --preset x64-debug
  • cmake --build --preset x64-debug --target AfxHookSource2
  • Produced AfxHookSource2_d.dll successfully after rebasing onto main, with no new compiler warnings from the modified files.
  • ctest --test-dir build/x64-debug -C Debug --output-on-failure reports that this preset registers no tests.

The configure step needed a local, uncommitted vswhere -products "*" workaround because the test machine has Visual Studio Build Tools rather than a full Visual Studio product.
That build-system workaround is intentionally not part of this PR.

An earlier version of the Panorama resolver path was exercised against CS2 1.41.6.8 in a real HLAE recording and produced 1920x1080 at 60 fps with the expected POV, HUD, radar, crosshair, killfeed, and audio.
This rebased commit has been compile-validated but has not been launched in CS2, so runtime confirmation remains outstanding.

@dtugend dtugend self-assigned this Jul 10, 2026
@dtugend dtugend added this to the upcoming milestone Jul 10, 2026
@dtugend
dtugend merged commit facaa10 into advancedfx:main Jul 10, 2026
@dtugend dtugend removed their assignment Jul 10, 2026
@dtugend

dtugend commented Jul 10, 2026

Copy link
Copy Markdown
Member

Thank you.

@rechedev9

Copy link
Copy Markdown
Contributor Author

Thank you.

Welcome!

@rechedev9
rechedev9 deleted the codex/hlae-resilient-optional-hooks branch July 15, 2026 18:04
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.

2 participants