diff options
author | KittenPopo <Pokeberry123@gmail.com> | 2022-03-26 16:20:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 23:20:09 +0000 |
commit | 379cbc8bc251307777a14b901e5617e834398485 (patch) | |
tree | 4722db4a3c301462ca009f5bb2976508b652677e /NorthstarDedicatedTest/convar.cpp | |
parent | 2c74033440212308eb0fe0d8b3135ffc5cd0422e (diff) | |
download | NorthstarLauncher-379cbc8bc251307777a14b901e5617e834398485.tar.gz NorthstarLauncher-379cbc8bc251307777a14b901e5617e834398485.zip |
Major exploit fixes and some minor bug fixes/improvements (#117)v1.6.0-rc3
* Added main exploit fixes
* Fixed typo in sigscanning.cpp
* Fully implemented
* Added proper includes for new files
* Update README.md
* typo
* spare me my sanity (fixed ridiculous code)
* Added rest of KittenMemUtils
* Rename KittenMemUtils
* Removed all messy memory edits, implemented NSMem instead
* Update NorthstarDedicatedTest.vcxproj
* [1] Move everything from securitypatches to ExploitFixes
* [2] Move everything from securitypatches to ExploitFixes
* Fixed module offsets in stack trace
* Fixed UTF8 Parsing (Multiplayer Crash)
* Implemented UT8 fix
* Update NorthstarDedicatedTest.vcxproj
* Update hookutils.cpp
* Small fixes
* all my homies hate clang-format
* Temporarily restore README.md
* Added string hash macro
* Added convenient vtfunc macro
* Made lil ConCommand creation macro
* Fixed multiple NET_SetConVar exploits
* Quick fixerino
* Fix convar struct (and other things)
* Revive clang-format (but good, i think)
* Update .clang-format
* Reformatted code to meet .clang-format requirements
* Minor formatting fixes
* Fixed Northstar "crashing" when console is closed
* Update .clang-format
Diffstat (limited to 'NorthstarDedicatedTest/convar.cpp')
-rw-r--r-- | NorthstarDedicatedTest/convar.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/NorthstarDedicatedTest/convar.cpp b/NorthstarDedicatedTest/convar.cpp index 7023e13c..3f2728d0 100644 --- a/NorthstarDedicatedTest/convar.cpp +++ b/NorthstarDedicatedTest/convar.cpp @@ -6,10 +6,6 @@ #include "gameutils.h" #include "sourceinterface.h" -// should this be in modmanager? -std::unordered_map<std::string, ConVar*> - g_CustomConvars; // this is used in modloading code to determine whether we've registered a mod convar already - typedef void (*ConVarRegisterType)( ConVar* pConVar, const char* pszName, const char* pszDefaultValue, int nFlags, const char* pszHelpString, bool bMin, float fMin, bool bMax, float fMax, void* pCallback); @@ -40,6 +36,8 @@ void InitialiseConVars(HMODULE baseAddress) HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x417FA0, &ConVar::IsFlagSet, reinterpret_cast<LPVOID*>(&CvarIsFlagSet)); + + } //----------------------------------------------------------------------------- @@ -54,8 +52,6 @@ ConVar::ConVar(const char* pszName, const char* pszDefaultValue, int nFlags, con conVarMalloc(&this->m_pMalloc, 0, 0); // Allocate new memory for ConVar. conVarRegister(this, pszName, pszDefaultValue, nFlags, pszHelpString, 0, 0, 0, 0, 0); - - g_CustomConvars.emplace(pszName, this); } //----------------------------------------------------------------------------- @@ -72,8 +68,6 @@ ConVar::ConVar( conVarMalloc(&this->m_pMalloc, 0, 0); // Allocate new memory for ConVar. conVarRegister(this, pszName, pszDefaultValue, nFlags, pszHelpString, bMin, fMin, bMax, fMax, pCallback); - - g_CustomConvars.emplace(pszName, this); } //----------------------------------------------------------------------------- @@ -82,10 +76,7 @@ ConVar::ConVar( ConVar::~ConVar(void) { if (m_Value.m_pszString) - { delete[] m_Value.m_pszString; - m_Value.m_pszString = NULL; - } } //----------------------------------------------------------------------------- |