aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/dedicatedmaterialsystem.cpp')
-rw-r--r--NorthstarDedicatedTest/dedicatedmaterialsystem.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp b/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
new file mode 100644
index 00000000..93e0a0eb
--- /dev/null
+++ b/NorthstarDedicatedTest/dedicatedmaterialsystem.cpp
@@ -0,0 +1,19 @@
+#pragma once
+#include "pch.h"
+#include "dedicatedmaterialsystem.h"
+#include "hookutils.h"
+
+void InitialiseDedicatedMaterialSystem(HMODULE baseAddress)
+{
+ {
+ // CMaterialSystem::FindMaterial
+ char* ptr = (char*)baseAddress + 0x5F0F1;
+ TempReadWrite rw(ptr);
+
+ // make the game use the error material
+ *ptr = 0xE9;
+ *(ptr + 1) = (char)0x34;
+ *(ptr + 2) = (char)0x03;
+ *(ptr + 3) = (char)0x00;
+ }
+} \ No newline at end of file