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/bf1 | |
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/bf1')
-rw-r--r-- | plugins/bf1/bf1.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/bf1/bf1.cpp b/plugins/bf1/bf1.cpp index 8018bf11e..266dd9530 100644 --- a/plugins/bf1/bf1.cpp +++ b/plugins/bf1/bf1.cpp @@ -60,11 +60,11 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (!squad_offset_3) return false; // Peekproc and assign game addresses to our containers, so we can retrieve positional data - ok = peekProc(state_offset_3 + 0x50, &state, 1) && // Magical state value: 1 when in-game and 0 when not spawned or playing. - peekProc(pModule + 0x35D2C60, avatar_pos, 12) && // Avatar position values (X, Y and Z). - peekProc(camera_base + 0x2B0, camera_pos, 12) && // Camera position values (X, Y and Z). - peekProc(camera_base + 0x260, camera_front, 12) && // Avatar front vector values (X, Y and Z). - peekProc(camera_base + 0x250, camera_top, 12) && // Avatar top vector values (X, Y and Z). + ok = peekProc(state_offset_3 + 0x50, state) && // Magical state value: 1 when in-game and 0 when not spawned or playing. + peekProc(pModule + 0x35D2C60, avatar_pos) && // Avatar position values (X, Y and Z). + peekProc(camera_base + 0x2B0, camera_pos) && // Camera position values (X, Y and Z). + peekProc(camera_base + 0x260, camera_front) && // Avatar front vector values (X, Y and Z). + peekProc(camera_base + 0x250, camera_top) && // Avatar top vector values (X, Y and Z). peekProc(server_name_offset, server_name) && // Server name. peekProc(team_offset_2 + 0x13, team) && // Team name. peekProc(squad_offset_3 + 0x240, squad) && // Squad value: 0 (not in a squad), 1 (Apples), 2 (Butter), 3 (Charlie)... 26 (Zebra). |