From a49cff34f9663f24bdf624b4202f400d0cdcec15 Mon Sep 17 00:00:00 2001 From: azzy <67557558+azzyr@users.noreply.github.com> Date: Sat, 27 Apr 2024 04:31:21 +0300 Subject: [PATCH] Fix vertex blend swapping in Hammer for SDK_LightmappedGeneric Out of bounds array index corrupting the stack --- .../materialsystem/stdshaders/lightmappedgeneric_dx9_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/materialsystem/stdshaders/lightmappedgeneric_dx9_helper.cpp b/sp/src/materialsystem/stdshaders/lightmappedgeneric_dx9_helper.cpp index 6f64a15d83..2273db4914 100644 --- a/sp/src/materialsystem/stdshaders/lightmappedgeneric_dx9_helper.cpp +++ b/sp/src/materialsystem/stdshaders/lightmappedgeneric_dx9_helper.cpp @@ -1537,7 +1537,7 @@ void DrawLightmappedGeneric_DX9_Internal(CBaseVSShader *pShader, IMaterialVar** float envMapOrigin[4] = {0,0,0,0}; params[info.m_nEnvmapOrigin]->GetVecValue( envMapOrigin, 3 ); #ifdef MAPBASE - envMapOrigin[4] = bEditorBlend ? 1.0f : 0.0f; + envMapOrigin[3] = bEditorBlend ? 1.0f : 0.0f; #endif pContextData->m_SemiStaticCmdsOut.SetPixelShaderConstant( 21, envMapOrigin );