diff --git a/r5dev/materialsystem/cmaterialsystem.cpp b/r5dev/materialsystem/cmaterialsystem.cpp index 7c2beae6..eee5e033 100644 --- a/r5dev/materialsystem/cmaterialsystem.cpp +++ b/r5dev/materialsystem/cmaterialsystem.cpp @@ -10,6 +10,7 @@ #include "materialsystem/cmaterialglue.h" #include "materialsystem/cmaterialsystem.h" +#ifndef DEDICATED //--------------------------------------------------------------------------------- // Purpose: loads and processes STBSP files // (overrides level name if stbsp field has value in prerequisites file) @@ -80,6 +81,7 @@ void* __fastcall DispatchDrawCall(int64_t a1, uint64_t a2, int a3, int a4, int64 return v_DispatchDrawCall(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); #endif } +#endif // !DEDICATED //----------------------------------------------------------------------------- // Purpose: checks if ptr is valid, and checks for equality against CMaterial vftable @@ -114,12 +116,16 @@ bool IsMaterialInternal(void** pCandidate) /////////////////////////////////////////////////////////////////////////////// void CMaterialSystem_Attach() { +#ifndef DEDICATED DetourAttach((LPVOID*)&v_StreamDB_Init, &StreamDB_Init); DetourAttach((LPVOID*)&v_DispatchDrawCall, &DispatchDrawCall); +#endif // !DEDICATED } void CMaterialSystem_Detach() { +#ifndef DEDICATED DetourDetach((LPVOID*)&v_StreamDB_Init, &StreamDB_Init); DetourDetach((LPVOID*)&v_DispatchDrawCall, &DispatchDrawCall); +#endif // !DEDICATED } \ No newline at end of file diff --git a/r5dev/vproj/dedicated.vcxproj b/r5dev/vproj/dedicated.vcxproj index d3e860cb..ec3b81b1 100644 --- a/r5dev/vproj/dedicated.vcxproj +++ b/r5dev/vproj/dedicated.vcxproj @@ -516,6 +516,7 @@ <ClCompile Include="..\launcher\IApplication.cpp" /> <ClCompile Include="..\launcher\launcher.cpp" /> <ClCompile Include="..\launcher\prx.cpp" /> + <ClCompile Include="..\materialsystem\cmaterialsystem.cpp" /> <ClCompile Include="..\mathlib\adler32.cpp" /> <ClCompile Include="..\mathlib\almostequal.cpp" /> <ClCompile Include="..\mathlib\fbits.cpp" /> diff --git a/r5dev/vproj/dedicated.vcxproj.filters b/r5dev/vproj/dedicated.vcxproj.filters index f6649404..3270e893 100644 --- a/r5dev/vproj/dedicated.vcxproj.filters +++ b/r5dev/vproj/dedicated.vcxproj.filters @@ -1565,6 +1565,9 @@ <ClCompile Include="..\engine\sdk_dll.cpp"> <Filter>sdk\engine</Filter> </ClCompile> + <ClCompile Include="..\materialsystem\cmaterialsystem.cpp"> + <Filter>sdk\materialsystem</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <None Include="..\Dedicated.def" />