diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 11:39:18 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 11:39:18 +0100 |
| commit | b287fc803c73d3ae076c49d726e17e13faa15050 (patch) | |
| tree | 0e962adff452973119293345a643f6601a7c2c60 /src/studio.cpp | |
| parent | Props: match the studio model name format (diff) | |
| download | hl2h-b287fc803c73d3ae076c49d726e17e13faa15050.tar.gz hl2h-b287fc803c73d3ae076c49d726e17e13faa15050.zip | |
Props: disable StudioRender hooks, fix m_clrRender offset
Hooking IStudioRender's draw/setter slots made matched props render the error
material and then crashed the material system ("debug/modelstats has bad
reference count 0 when being bound"). Keep the hook code for reference but do
not install it.
Fix the m_clrRender netvar resolution: the walk picked an embedded table entry
at offset 0, so the earlier entity writes stomped entity vtables. Only accept
offsets inside C_BaseEntity (0x20..0x2000), then write the prop colour there
for models/props entities. Restore white when disabled.
Diffstat (limited to '')
| -rw-r--r-- | src/studio.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/studio.cpp b/src/studio.cpp index baabcfa..c63ddab 100644 --- a/src/studio.cpp +++ b/src/studio.cpp | |||
| @@ -201,6 +201,10 @@ void studio_props_init() { | |||
| 201 | if (g_install_tried) | 201 | if (g_install_tried) |
| 202 | return; | 202 | return; |
| 203 | g_install_tried = true; | 203 | g_install_tried = true; |
| 204 | // Disabled: replacing IStudioRender draw/setter entries corrupted material | ||
| 205 | // state (error-material props, bad reference counts, crash). Prop tint uses | ||
| 206 | // the entity render colour path in esp.cpp instead. | ||
| 207 | return; | ||
| 204 | 208 | ||
| 205 | std::string path = loaded_module_path("studiorender"); | 209 | std::string path = loaded_module_path("studiorender"); |
| 206 | void *h = nullptr; | 210 | void *h = nullptr; |
