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 | |
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')
-rw-r--r-- | plugins/bf4/bf4.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/bf4/bf4.cpp b/plugins/bf4/bf4.cpp index 54d848197..640cd4f93 100644 --- a/plugins/bf4/bf4.cpp +++ b/plugins/bf4/bf4.cpp @@ -36,11 +36,11 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (!squad_offset_2) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data - ok = peekProc(pModule + 0x21CAFF0, &state, 1) && // Magical state value: 0 when in-game and 1 when in menu/dead. - peekProc(pModule + 0x21C6D40, avatar_pos, 12) && // Avatar Position values (X, Y and Z). - peekProc(pModule + 0x21CAF80, camera_pos, 12) && // Camera Position values (X, Y and Z). - peekProc(pModule + 0x21CAF60, avatar_top, 12) && // Avatar Top Vector values (X, Y and Z). - peekProc(pModule + 0x21CAF70, avatar_front, 12) && // Avatar Front Vector values (X, Y and Z). + ok = peekProc(pModule + 0x21CAFF0, state) && // Magical state value: 0 when in-game and 1 when in menu/dead. + peekProc(pModule + 0x21C6D40, avatar_pos) && // Avatar Position values (X, Y and Z). + peekProc(pModule + 0x21CAF80, camera_pos) && // Camera Position values (X, Y and Z). + peekProc(pModule + 0x21CAF60, avatar_top) && // Avatar Top Vector values (X, Y and Z). + peekProc(pModule + 0x21CAF70, avatar_front) && // Avatar Front Vector values (X, Y and Z). peekProc(serverid_offset, serverid) && // Server ID (36 characters). peekProc(pModule + 0x21B80C0, host) && // Host value: "IP:Port" when in a server, "bot" when loading and empty when it's hidden. peekProc(pModule + 0x24AFAE5, team) && // Team value: US (United States); RU (Russia); CH (China). |