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/codmw2 | |
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/codmw2')
-rw-r--r-- | plugins/codmw2/codmw2.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/codmw2/codmw2.cpp b/plugins/codmw2/codmw2.cpp index bc9883e4e..05ecad580 100644 --- a/plugins/codmw2/codmw2.cpp +++ b/plugins/codmw2/codmw2.cpp @@ -27,7 +27,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa 0x007F7A34 byte Magical state value */ - ok = peekProc(0x007F8AB4, &state, 1); // Magical state value + ok = peekProc(0x007F8AB4, state); // Magical state value if (! ok) return false; /* @@ -42,11 +42,11 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa if (state != 1) return true; // This results in all vectors beeing zero which tells mumble to ignore them. - ok = peekProc(0x008F1FF8, avatar_pos+2, 4) && //Z - peekProc(0x008F1FFC, avatar_pos, 4) && //X - peekProc(0x008F2000, avatar_pos+1, 4) && //Y - peekProc(0x008F2008, &viewHor, 4) && //Hor - peekProc(0x008F2004, &viewVer, 4); //Ver + ok = peekProc(0x008F1FF8, avatar_pos[2]) && //Z + peekProc(0x008F1FFC, avatar_pos[0]) && //X + peekProc(0x008F2000, avatar_pos[1]) && //Y + peekProc(0x008F2008, viewHor) && //Hor + peekProc(0x008F2004, viewVer); //Ver if (! ok) return false; |