Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin update for latest version of Rocket League #2314

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions plugins/rl/rl.cpp
Expand Up @@ -16,21 +16,23 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
float avatar_pos_corrector[3], camera_pos_corrector[3], avatar_front_corrector[3], camera_front_corrector[3], camera_top_corrector[3];

// Avatar pointers
BYTE *avatar_base = peekProc<BYTE *>(pModule + 0x016EA900);
BYTE *avatar_base = peekProc<BYTE *>(pModule + 0x016FEC04);
if (!avatar_base) return false;
BYTE *avatar_offset_0 = peekProc<BYTE *>(avatar_base + 0x44);
BYTE *avatar_offset_0 = peekProc<BYTE *>(avatar_base + 0x448);
if (!avatar_offset_0) return false;
BYTE *avatar_offset_1 = peekProc<BYTE *>(avatar_offset_0 + 0x4C);
BYTE *avatar_offset_1 = peekProc<BYTE *>(avatar_offset_0 + 0x440);
if (!avatar_offset_1) return false;
BYTE *avatar_offset = peekProc<BYTE *>(avatar_offset_1 + 0x1C);
BYTE *avatar_offset_2 = peekProc<BYTE *>(avatar_offset_1 + 0x0);
if (!avatar_offset_2) return false;
BYTE *avatar_offset = peekProc<BYTE *>(avatar_offset_2 + 0x1C);
if (!avatar_offset) return false;

// Peekproc and assign game addresses to our containers, so we can retrieve positional data
ok = peekProc((BYTE *) avatar_offset + 0x0, &avatar_pos_corrector, 12) && // Avatar Position values (Z, Y and X).
peekProc((BYTE *) pModule + 0x016EAB30, &camera_pos_corrector, 12) && // Camera Position values (Z, Y and X).
peekProc((BYTE *) pModule + 0x016FEE40, &camera_pos_corrector, 12) && // Camera Position values (Z, Y and X).
peekProc((BYTE *) avatar_offset + 0xC, &avatar_front_corrector, 12) && // Avatar Front values (Z, Y and X).
peekProc((BYTE *) pModule + 0x016EAB18, &camera_front_corrector, 12) && // Camera Front Vector values (Z, Y and X).
peekProc((BYTE *) pModule + 0x016EAB24, &camera_top_corrector, 12); // Camera Top Vector values (Z, Y and X).
peekProc((BYTE *) pModule + 0x016FEE28, &camera_front_corrector, 12) && // Camera Front Vector values (Z, Y and X).
peekProc((BYTE *) pModule + 0x016FEE34, &camera_top_corrector, 12); // Camera Top Vector values (Z, Y and X).

// This prevents the plugin from linking to the game in case something goes wrong during values retrieval from memory addresses.
if (! ok)
Expand Down