From 96ee0a834dade6b8e45c3617cb957d573b7803cb Mon Sep 17 00:00:00 2001 From: PixieCore <41352111+PixieCore@users.noreply.github.com> Date: Fri, 18 Mar 2022 20:13:28 +0100 Subject: [PATCH] Added DXTexture fields to CMaterialGlue --- r5dev/materialsystem/cmaterialglue.h | 5 ++++- r5dev/tier0/completion.cpp | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/r5dev/materialsystem/cmaterialglue.h b/r5dev/materialsystem/cmaterialglue.h index 3429faae..1717ba4c 100644 --- a/r5dev/materialsystem/cmaterialglue.h +++ b/r5dev/materialsystem/cmaterialglue.h @@ -21,7 +21,10 @@ public: void* m_pTextureGUID2; //0x0068 char pad_0070[4]; //0x0070 int32_t m_iMaterialRes; //0x0074 - char pad_0078[184]; //0x0078 + char pad_0078[136]; //0x0078 + void** m_ppDXTexture1; //0x0100 + void** m_ppDXTexture2; //0x0108 + char pad_0110[32]; //0x0110 }; //Size: 0x0130 namespace diff --git a/r5dev/tier0/completion.cpp b/r5dev/tier0/completion.cpp index 7b9bf0fa..e54d9e43 100644 --- a/r5dev/tier0/completion.cpp +++ b/r5dev/tier0/completion.cpp @@ -829,6 +829,24 @@ void _CMaterial_GetMaterialAtCrossHair_f_ComplectionFunc(const CCommand& args) DevMsg(eDLL_T::MS, "] Material Surface Name 2: 'NULL'\n"); } + if (material->m_ppDXTexture1) + { + DevMsg(eDLL_T::MS, "] DX Texture 1: '%llX'\n", material->m_ppDXTexture1); + } + else + { + DevMsg(eDLL_T::MS, "] DX Texture 1: 'NULL'\n"); + } + + if (material->m_ppDXTexture2) + { + DevMsg(eDLL_T::MS, "] DX Texture 2: '%llX'\n", material->m_ppDXTexture2); + } + else + { + DevMsg(eDLL_T::MS, "] DX Texture 2: 'NULL'\n"); + } + material->m_pDepthShadow ? fnPrintChild(material->m_pDepthShadow, " ] DepthShadow Addr: '%llX'\n") : DevMsg(eDLL_T::MS, "] DepthShadow Addr: 'NULL'\n"); material->m_pDepthPrepass ? fnPrintChild(material->m_pDepthPrepass, " ] DepthPrepass Addr: '%llX'\n") : DevMsg(eDLL_T::MS, "] DepthPrepass Addr: 'NULL'\n"); material->m_pDepthVSM ? fnPrintChild(material->m_pDepthVSM, " ] DepthVSM Addr: '%llX'\n") : DevMsg(eDLL_T::MS, "] DepthVSM Addr: 'NULL'\n");