aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/dedicatedmaterialsystem.cpp')
-rw-r--r--NorthstarDedicatedTest/dedicatedmaterialsystem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp b/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
index 93e0a0eb..48ade24d 100644
--- a/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
+++ b/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
@@ -1,16 +1,20 @@
#pragma once
#include "pch.h"
+#include "dedicated.h"
#include "dedicatedmaterialsystem.h"
#include "hookutils.h"
void InitialiseDedicatedMaterialSystem(HMODULE baseAddress)
{
+ if (!IsDedicated())
+ return;
+
{
// CMaterialSystem::FindMaterial
char* ptr = (char*)baseAddress + 0x5F0F1;
TempReadWrite rw(ptr);
- // make the game use the error material
+ // make the game always use the error material
*ptr = 0xE9;
*(ptr + 1) = (char)0x34;
*(ptr + 2) = (char)0x03;