From 9055a011418be4c15c50702fcb0f54536dcc9ca3 Mon Sep 17 00:00:00 2001 From: Yui <50331474+SirYodaJedi@users.noreply.github.com> Date: Mon, 24 Mar 2025 17:15:38 -0400 Subject: [PATCH] Replicate %alphatexture from Gmod --- sp/src/utils/vrad/vradstaticprops.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sp/src/utils/vrad/vradstaticprops.cpp b/sp/src/utils/vrad/vradstaticprops.cpp index f4f04a69..ebd77326 100644 --- a/sp/src/utils/vrad/vradstaticprops.cpp +++ b/sp/src/utils/vrad/vradstaticprops.cpp @@ -528,9 +528,17 @@ public: if ( pVMT->LoadFromBuffer( pMaterialName, buf ) ) { bFound = true; - if ( pVMT->FindKey("$translucent") || pVMT->FindKey("$alphatest") ) + if ( pVMT->FindKey("$alphatest") || pVMT->FindKey("$translucent") || pVMT->FindKey("%alphatexture") ) { - KeyValues *pBaseTexture = pVMT->FindKey("$basetexture"); + KeyValues *pBaseTexture = NULL; + if ( pVMT->FindKey("%alphatexture") ) + { + pBaseTexture = pVMT->FindKey("%alphatexture"); + } + else + { + pBaseTexture = pVMT->FindKey("$basetexture"); + } if ( pBaseTexture ) { const char *pBaseTextureName = pBaseTexture->GetString();