summaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 18:17:55 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 18:17:55 +0100
commit892329ec78acf4d4d63749e8c248227aabc2aded (patch)
tree187490c992e028221599e43d1846399c4c34462d /src/world.cpp
parentChams: exact material styles, GUI dropdown, viewmodel hookup (diff)
downloadhl2h-892329ec78acf4d4d63749e8c248227aabc2aded.tar.gz
hl2h-892329ec78acf4d4d63749e8c248227aabc2aded.zip
Chams: model-safe styles and a dedicated viewmodel material
VGUI/white materials do not draw skinned models, so every viewmodel style except the model debug one made the hands/weapon disappear. Use model debug materials for all styles: wireframe, additive vertex colour, translucent single colour, translucent vertex colour, MRM fullbright. The viewmodel always uses debug/debugtranslucentsinglecolor. A missing style now falls back to that material instead of vgui/white.
Diffstat (limited to '')
-rw-r--r--src/world.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/world.cpp b/src/world.cpp
index a2e65cc..d071281 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -1065,7 +1065,8 @@ void *world_find_material(const char *name) {
1065 logf("chams: material %s = %p", name, mat); 1065 logf("chams: material %s = %p", name, mat);
1066 return mat; 1066 return mat;
1067 } 1067 }
1068 static const char *fallbacks[] = {"models/debug/debugwhite", "vgui/white", 1068 static const char *fallbacks[] = {"debug/debugtranslucentsinglecolor",
1069 "models/debug/debugwhite", "vgui/white",
1069 nullptr}; 1070 nullptr};
1070 for (int i = 0; fallbacks[i]; i++) { 1071 for (int i = 0; fallbacks[i]; i++) {
1071 mat = walk(fallbacks[i]); 1072 mat = walk(fallbacks[i]);