From 72a60f6f39e52e0a6f9acd940cdffeeaa5dc43ee Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 5 Oct 2022 02:11:13 +0200 Subject: [PATCH] Fix project "dedicated" compile errors --- r5dev/materialsystem/cmaterialsystem.cpp | 6 ++++++ r5dev/vproj/dedicated.vcxproj | 1 + r5dev/vproj/dedicated.vcxproj.filters | 3 +++ 3 files changed, 10 insertions(+) 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 @@ + 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 @@ sdk\engine + + sdk\materialsystem +