Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Beatrici <davidebeatrici@gmail.com>2016-10-31 16:24:25 +0300
committerDavide Beatrici <davidebeatrici@gmail.com>2016-10-31 16:24:25 +0300
commit921ee19e3abd24482921d85b38c0c4b3d0cbcffe (patch)
treec26e7b7720b7c16d7b0e7bcd14394da9f898841b /plugins/cod4
parentca2fd07b90746a17dba13963f7bdd54812c5d016 (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/cod4')
-rw-r--r--plugins/cod4/cod4.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/cod4/cod4.cpp b/plugins/cod4/cod4.cpp
index 6de8e7aa7..9bc18125e 100644
--- a/plugins/cod4/cod4.cpp
+++ b/plugins/cod4/cod4.cpp
@@ -30,7 +30,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
0x0074E380 byte Magical state value
*/
- ok = peekProc(0x0074E380, &state, 1); // Magical state value
+ ok = peekProc(0x0074E380, state); // Magical state value
if (! ok)
return false;
/*
@@ -45,12 +45,12 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
if (state != 4)
return true; // This results in all vectors beeing zero which tells mumble to ignore them.
- ok = peekProc(0x0072AFD0, avatar_pos+2, 4) && //Z
- peekProc(0x0072AFE0, avatar_pos, 4) && //X
- peekProc(0x0072AFF0, avatar_pos+1, 4) && //Y
- peekProc(0x0072AF3C, &viewHor, 4) && //Hor
- peekProc(0x0072AF38, &viewVer, 4) && //Ver
- peekProc(0x00956D88, ccontext, 128);
+ ok = peekProc(0x0072AFD0, avatar_pos[2]) && //Z
+ peekProc(0x0072AFE0, avatar_pos[0]) && //X
+ peekProc(0x0072AFF0, avatar_pos[1]) && //Y
+ peekProc(0x0072AF3C, viewHor) && //Hor
+ peekProc(0x0072AF38, viewVer) && //Ver
+ peekProc(0x00956D88, ccontext);
if (! ok)
return false;