From be175cff45d5a60a87a17b7edea391a5124cb0db Mon Sep 17 00:00:00 2001 From: Maxim Mikhaylov Date: Sun, 26 Jun 2022 16:40:56 +0300 Subject: [PATCH 1/2] fix initKeyValues sig --- src/core/features/chams.cpp | 2 +- src/sdk/classes/keyvalues.hpp | 3 +++ src/sdk/netvars.cpp | 2 +- src/sdk/netvars.hpp | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/features/chams.cpp b/src/core/features/chams.cpp index b4285d9d..d284f012 100644 --- a/src/core/features/chams.cpp +++ b/src/core/features/chams.cpp @@ -15,7 +15,7 @@ IMaterial* oilMaterial; IMaterial* createMaterial(const char* materialName, const char* materialType, const char* material) { KeyValues* keyValues = new KeyValues(materialName); - Offsets::initKeyValues(keyValues, materialType); + Offsets::initKeyValues(keyValues, materialType, 0, 0); Offsets::loadFromBuffer(keyValues, materialName, material, nullptr, nullptr, nullptr); return Interfaces::materialSystem->CreateMaterial(materialName, keyValues); diff --git a/src/sdk/classes/keyvalues.hpp b/src/sdk/classes/keyvalues.hpp index a2c2a2a0..a4c141c0 100644 --- a/src/sdk/classes/keyvalues.hpp +++ b/src/sdk/classes/keyvalues.hpp @@ -298,6 +298,9 @@ class KeyValues char m_bEvaluateConditionals; // true, if while parsing this KeyValue, conditionals blocks are evaluated (default true) char unused[ 1 ]; + uint32_t m_iUnk1; + uint32_t m_iUnk2; + KeyValues *m_pPeer; // pointer to next key in list KeyValues *m_pSub; // pointer to Start of a new sub key list KeyValues *m_pChain;// Search here if it's not in our list diff --git a/src/sdk/netvars.cpp b/src/sdk/netvars.cpp index b84df462..a1b972df 100644 --- a/src/sdk/netvars.cpp +++ b/src/sdk/netvars.cpp @@ -59,7 +59,7 @@ bool Netvar::init() { Log::log(LOG, " radarIsHltvCheck | %lx", Offsets::radarIsHltvCheck); Offsets::initKeyValues = (Offsets::InitKeyValues)PatternScan::findFirstInModule("/client_client.so", - "81 27 00 00 00 FF 55 31 C0 48 89 E5 5D"); + "81 27 00 00 00 FF 55 45 31 C0 48 89 E5 5D"); // xref: OldParticleSystem_Destroy Log::log(LOG, " initKeyValues | %lx", Offsets::initKeyValues); Offsets::loadFromBuffer = (Offsets::LoadFromBuffer)PatternScan::findFirstInModule("/client_client.so", diff --git a/src/sdk/netvars.hpp b/src/sdk/netvars.hpp index b27d5ef2..ac752f8b 100644 --- a/src/sdk/netvars.hpp +++ b/src/sdk/netvars.hpp @@ -78,7 +78,7 @@ namespace Offsets { inline uintptr_t radarIsHltvCheck; - typedef void (*InitKeyValues)(KeyValues*, const char*); + typedef void (*InitKeyValues)(KeyValues*, const char*, int, int); inline InitKeyValues initKeyValues; typedef void (*LoadFromBuffer)(KeyValues*, const char*, const char*, void*, const char*, void*); From 0cc77ded0a1bb634b0b8698f7fce60da4a53ed1c Mon Sep 17 00:00:00 2001 From: Maxim Mikhaylov Date: Mon, 27 Jun 2022 13:55:51 +0300 Subject: [PATCH 2/2] add myself to contributors --- CONTRIBUTORS | 3 ++- src/core/menu/tabs/misc.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d6b61ca3..d8ed28ae 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -13,4 +13,5 @@ u2ooS nigma1337 vampur DENZIL -Enron \ No newline at end of file +Enron +Jovvik \ No newline at end of file diff --git a/src/core/menu/tabs/misc.cpp b/src/core/menu/tabs/misc.cpp index 9863bc84..dc614921 100644 --- a/src/core/menu/tabs/misc.cpp +++ b/src/core/menu/tabs/misc.cpp @@ -135,7 +135,7 @@ void Menu::drawMiscTab() { ImGui::Columns(1); ImGui::TextDisabled("Credits!"); if (ImGui::IsItemHovered()) - ImGui::SetTooltip("sekc (of course)\nAll other contributors on GitHub (xXx-sans-xXx, luk1337, cristeigabriel, crazily, dave (@dweee), keenan, u2ooS, tango1337, nigma1337, vampur, all and any other contributors, and allbombson)\nand ocornut for his great ImGui UI framework"); + ImGui::SetTooltip("sekc (of course)\nAll other contributors on GitHub (xXx-sans-xXx, luk1337, cristeigabriel, crazily, dave (@dweee), keenan, u2ooS, tango1337, nigma1337, vampur, jovvik, all and any other contributors, and allbombson)\nand ocornut for his great ImGui UI framework"); ImGui::EndTabItem(); }