diff options
author | davidebeatrici <davidebeatrici@gmail.com> | 2018-03-26 01:18:16 +0300 |
---|---|---|
committer | davidebeatrici <davidebeatrici@gmail.com> | 2018-03-26 01:18:39 +0300 |
commit | c45695cedfcee6745eb5a8cfb3749a3b3df65ec9 (patch) | |
tree | f44faf0c24e54264f07c5cc7bc78ca71290fca0a | |
parent | 26c732fb0819a4f2617a873a3a9088315ca576ea (diff) |
plugins/rl: update plugin and add avatar top vector support
Game version: 1.42
https://www.rocketleague.com/news/patch-notes-v1-42
-rw-r--r-- | plugins/rl/rl.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/plugins/rl/rl.cpp b/plugins/rl/rl.cpp index cd9099075..b50671080 100644 --- a/plugins/rl/rl.cpp +++ b/plugins/rl/rl.cpp @@ -11,20 +11,32 @@ #ifdef WIN32 // Memory offsets -const procptr_t camera_pos_offset = 0x17428D8; -const procptr_t camera_front_offset = 0x17428C0; -const procptr_t camera_top_offset = 0x17428CC; -const procptr_t avatar_pos_offset = 0x0; -const procptr_t avatar_front_offset = 0xC; +const procptr_t camera_pos_offset = 0x1A2A338; +const procptr_t camera_front_offset = 0x1A2A320; +const procptr_t camera_top_offset = 0x1A2A32C; +const procptr_t avatar_offset_base = 0x18E1448; +const procptr_t avatar_offset_0 = 0x40; +const procptr_t avatar_offset_1 = 0x6B4; +const procptr_t avatar_offset_2 = 0x18; +const procptr_t avatar_offset_3 = 0x1C; +const procptr_t avatar_pos_offset = 0x18; +const procptr_t avatar_front_offset = 0x0; +const procptr_t avatar_top_offset = 0xC; // Executable name const wchar_t *exe_name = L"RocketLeague.exe"; #else // Memory offsets -const procptr_t camera_pos_offset = 0x302AAB8; -const procptr_t camera_front_offset = 0x302AAA0; -const procptr_t camera_top_offset = 0x302AAAC; -const procptr_t avatar_pos_offset = 0x60; -const procptr_t avatar_front_offset = 0x6C; +const procptr_t camera_pos_offset = 0x30DE018; +const procptr_t camera_front_offset = 0x30DE000; +const procptr_t camera_top_offset = 0x30DE00C; +const procptr_t avatar_offset_base = 0x30DD6A0; +const procptr_t avatar_offset_0 = 0x408; +const procptr_t avatar_offset_1 = 0x648; +const procptr_t avatar_offset_2 = 0x40; +const procptr_t avatar_offset_3 = 0x80; +const procptr_t avatar_pos_offset = 0x24; +const procptr_t avatar_front_offset = 0xC; +const procptr_t avatar_top_offset = 0x18; // Executable name const wchar_t *exe_name = L"RocketLeague"; #endif @@ -37,32 +49,22 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa bool ok; // Avatar pointers -#ifdef WIN32 - procptr_t avatar_base = peekProcPtr(pModule + 0x174269C); - if (!avatar_base) return false; - procptr_t avatar_offset_0 = peekProcPtr(avatar_base + 0x448); - if (!avatar_offset_0) return false; - procptr_t avatar_offset_1 = peekProcPtr(avatar_offset_0 + 0x440); - if (!avatar_offset_1) return false; - procptr_t avatar_offset_2 = peekProcPtr(avatar_offset_1 + 0x0); - if (!avatar_offset_2) return false; - procptr_t avatar_offset = peekProcPtr(avatar_offset_2 + 0x1C); - if (!avatar_offset) return false; -#else - procptr_t avatar_base = peekProcPtr(pModule + 0x302A4F0); - if (!avatar_base) return false; - procptr_t avatar_offset_0 = peekProcPtr(avatar_base + 0x6c8); - if (!avatar_offset_0) return false; - procptr_t avatar_offset_1 = peekProcPtr(avatar_offset_0 + 0x2b0); - if (!avatar_offset_1) return false; - procptr_t avatar_offset = peekProcPtr(avatar_offset_1 + 0x38); - if (!avatar_offset) return false; -#endif + procptr_t avatar_ptr_base = peekProcPtr(pModule + avatar_offset_base); + if (!avatar_ptr_base) return false; + procptr_t avatar_ptr_0 = peekProcPtr(avatar_ptr_base + avatar_offset_0); + if (!avatar_ptr_0) return false; + procptr_t avatar_ptr_1 = peekProcPtr(avatar_ptr_0 + avatar_offset_1); + if (!avatar_ptr_1) return false; + procptr_t avatar_ptr_2 = peekProcPtr(avatar_ptr_1 + avatar_offset_2); + if (!avatar_ptr_2) return false; + procptr_t avatar_ptr_3 = peekProcPtr(avatar_ptr_2 + avatar_offset_3); + if (!avatar_ptr_3) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data - ok = peekProc(avatar_offset + avatar_pos_offset, avatar_pos, 12) && // Avatar Position values (X, Y and Z). + ok = peekProc(avatar_ptr_3 + avatar_pos_offset, avatar_pos, 12) && // Avatar Position values (X, Y and Z). peekProc(pModule + camera_pos_offset, camera_pos, 12) && // Camera Position values (X, Y and Z). - peekProc(avatar_offset + avatar_front_offset, avatar_front, 12) && // Avatar Front values (X, Y and Z). + peekProc(avatar_ptr_3 + avatar_front_offset, avatar_front, 12) && // Avatar Front values (X, Y and Z). + peekProc(avatar_ptr_3 + avatar_top_offset, avatar_top, 12) && // Avatar Top values (X, Y and Z). peekProc(pModule + camera_front_offset, camera_front, 12) && // Camera Front Vector values (X, Y and Z). peekProc(pModule + camera_top_offset, camera_top, 12); // Camera Top Vector values (X, Y and Z). @@ -70,8 +72,6 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (! ok) return false; - avatar_top[2] = -1; // This tells Mumble to automatically calculate top vector using front vector. - // Scale from centimeters to meters for (int i=0;i<3;i++) { avatar_pos[i]/=100.0f; @@ -100,10 +100,10 @@ static int trylock(const std::multimap<std::wstring, unsigned long long int> &pi } static const std::wstring longdesc() { - return std::wstring(L"Supports Rocket League version 1.29 without context or identity support yet."); // Plugin long description + return std::wstring(L"Supports Rocket League version 1.42 without context or identity support yet."); // Plugin long description } -static std::wstring description(L"Rocket League (v1.29)"); // Plugin short description +static std::wstring description(L"Rocket League (v1.42)"); // Plugin short description static std::wstring shortname(L"Rocket League"); // Plugin short name static int trylock1() { |