aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/maxplayers.cpp
diff options
context:
space:
mode:
authorKawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>2022-03-24 00:55:20 +0100
committerGitHub <noreply@github.com>2022-03-24 00:55:20 +0100
commitb5405b462656b83a37bf1eb41b049b0913980a13 (patch)
treeb9e48626b49782161ddaff84ae257bfece72c257 /NorthstarDedicatedTest/maxplayers.cpp
parent178f1deca8fe94167307e1717cee7250a3f3b8b4 (diff)
parentde7deafc7e6ba53deec8dd3c05d2ea5e7cf42264 (diff)
downloadNorthstarLauncher-b5405b462656b83a37bf1eb41b049b0913980a13.tar.gz
NorthstarLauncher-b5405b462656b83a37bf1eb41b049b0913980a13.zip
Merge branch 'main' into NetCon
Diffstat (limited to 'NorthstarDedicatedTest/maxplayers.cpp')
-rw-r--r--NorthstarDedicatedTest/maxplayers.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/NorthstarDedicatedTest/maxplayers.cpp b/NorthstarDedicatedTest/maxplayers.cpp
index 674d3ef0..54f1a896 100644
--- a/NorthstarDedicatedTest/maxplayers.cpp
+++ b/NorthstarDedicatedTest/maxplayers.cpp
@@ -45,10 +45,9 @@ constexpr int Team_PlayerArray_AddedLength = NEW_MAX_PLAYERS - 32;
constexpr int Team_PlayerArray_AddedSize = PAD_NUMBER(Team_PlayerArray_AddedLength * 8, 4);
constexpr int Team_AddedSize = Team_PlayerArray_AddedSize;
-template <class T> void ChangeOffset(void* addr, unsigned int offset)
-{
- TempReadWrite rw(addr);
- *((T*)addr) = offset;
+#include "NSMem.h"
+template <class T> void ChangeOffset(void* addr, unsigned int offset) {
+ NSMem::BytePatch((uintptr_t)addr, (BYTE*)&offset, sizeof(T));
}
/*