diff options
author | Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> | 2022-03-24 00:55:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 00:55:20 +0100 |
commit | b5405b462656b83a37bf1eb41b049b0913980a13 (patch) | |
tree | b9e48626b49782161ddaff84ae257bfece72c257 /NorthstarDedicatedTest/maxplayers.cpp | |
parent | 178f1deca8fe94167307e1717cee7250a3f3b8b4 (diff) | |
parent | de7deafc7e6ba53deec8dd3c05d2ea5e7cf42264 (diff) | |
download | NorthstarLauncher-b5405b462656b83a37bf1eb41b049b0913980a13.tar.gz NorthstarLauncher-b5405b462656b83a37bf1eb41b049b0913980a13.zip |
Merge branch 'main' into NetCon
Diffstat (limited to 'NorthstarDedicatedTest/maxplayers.cpp')
-rw-r--r-- | NorthstarDedicatedTest/maxplayers.cpp | 7 |
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)); } /* |