diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2016-10-31 16:24:25 +0300 |
---|---|---|
committer | Davide Beatrici <davidebeatrici@gmail.com> | 2016-10-31 16:24:25 +0300 |
commit | 921ee19e3abd24482921d85b38c0c4b3d0cbcffe (patch) | |
tree | c26e7b7720b7c16d7b0e7bcd14394da9f898841b /plugins/bf4_x86 | |
parent | ca2fd07b90746a17dba13963f7bdd54812c5d016 (diff) |
plugins: use the short form of peekProc
The short form of peekProc automatically uses the correct size for the target.
Diffstat (limited to 'plugins/bf4_x86')
-rw-r--r-- | plugins/bf4_x86/bf4_x86.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/bf4_x86/bf4_x86.cpp b/plugins/bf4_x86/bf4_x86.cpp index 91d480bf8..056800ece 100644 --- a/plugins/bf4_x86/bf4_x86.cpp +++ b/plugins/bf4_x86/bf4_x86.cpp @@ -34,11 +34,11 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (!squad_offset_1) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data - ok = peekProc(pModule + 0x1BB6AC2, &state, 1) && // Magical state value: 0 when in-game and 1 when in menu/dead. - peekProc(pModule + 0x1BB3C30, avatar_pos, 12) && // Avatar Position values (X, Y and Z). - peekProc(pModule + 0x1BB6A90, camera_pos, 12) && // Camera Position values (X, Y and Z). - peekProc(pModule + 0x1BB6A70, avatar_top, 12) && // Avatar Top Vector values (X, Y and Z). - peekProc(pModule + 0x1BB6A80, avatar_front, 12) && // Avatar Front Vector values (X, Y and Z). + ok = peekProc(pModule + 0x1BB6AC2, state) && // Magical state value: 0 when in-game and 1 when in menu/dead. + peekProc(pModule + 0x1BB3C30, avatar_pos) && // Avatar Position values (X, Y and Z). + peekProc(pModule + 0x1BB6A90, camera_pos) && // Camera Position values (X, Y and Z). + peekProc(pModule + 0x1BB6A70, avatar_top) && // Avatar Top Vector values (X, Y and Z). + peekProc(pModule + 0x1BB6A80, avatar_front) && // Avatar Front Vector values (X, Y and Z). peekProc(serverid_offset, serverid) && // Server ID (36 characters). peekProc(pModule + 0x1BA8A10, host) && // Host value: "IP:Port" when in a server, "bot" when loading and empty when it's hidden. peekProc(pModule + 0x1C814B5, team) && // Team value: US (United States); RU (Russia); CH (China). |