Commit c63cc5c
committed
v2: Address Copilot PR review (#1609)
1. Hooks.cpp: RE7/MHRISE runtime exclusion for hook_update_before_lock_scene
The original compile-time guards (#ifndef RE7 / #ifndef MHRISE) explicitly
excluded these two games from the updateBeforeLockScene hook list because
via.render.EntityRenderer::updateBeforeLockScene does not exist on them.
The universal-build guard change broadened the #if to let every game
reach the hook. The body had a tdb_ver()<74 runtime gate but that gate
still *admits* RE7 (70) and MHRISE (71), so the hook would scan for a
method that never existed, return an error string, and Hooks::on_initialize
aborts on the first error — killing the whole Hooks mod on those two games.
Added a runtime early-return at the top of hook_update_before_lock_scene
for is_re7() || is_mhrise(), restoring the original exclusion behaviour.
Verified on RE7: Hooks::on_initialize reaches 'Finished hooking' without
the updateBeforeLockScene error.
Verified on RE2 (control): updateBeforeLockScene: 7ff74df58f10, hooks
still install normally.
2. GameIdentity.cpp: corrected misleading comment
derive_engine_params comment claimed runtime TDB auto-detection 'will
override' the hardcoded m_tdb_ver for legacy binaries, but no override
path exists — members are private and there is no setter or friend
accessor that writes m_tdb_ver after initialize().
Rewrote the comment to document actual behaviour: the hardcoded values
stand for the lifetime of the process, and demo/trial versions with
different TDB versions than the full game must be handled by either a
dedicated GameID entry or by hardcoding the correct value (see
PRAGMATA_SKETCHBOOK -> TDB 83).1 parent dc98094 commit c63cc5c
2 files changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
511 | 521 | | |
512 | 522 | | |
513 | 523 | | |
| |||
0 commit comments