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/cod2
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/cod2')
-rw-r--r--plugins/cod2/cod2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/cod2/cod2.cpp b/plugins/cod2/cod2.cpp
index 65b492e78..393ff64c5 100644
--- a/plugins/cod2/cod2.cpp
+++ b/plugins/cod2/cod2.cpp
@@ -26,18 +26,18 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
0x0151A110 float Vertical view (degrees) (=0 out-of-game)
0x0096B688 byte Magic value (0=ingame/out-of-game, 4=spectator)
*/
- ok = peekProc(0x0096B688, &state, 1);
+ ok = peekProc(0x0096B688, state);
if (! ok)
return false;
if (state == 4)
return true; // If this magic value is 4 we are spectating, so switch of PA
- ok = peekProc(0x01516608, avatar_pos+2, 4) && //Z
- peekProc(0x0151660C, avatar_pos, 4) && //X
- peekProc(0x01516610, avatar_pos+1, 4) && //Y
- peekProc(0x0151A114, &viewHor, 4) && //Hor
- peekProc(0x0151A110, &viewVer, 4); //Ver
+ ok = peekProc(0x01516608, avatar_pos[2]) && //Z
+ peekProc(0x0151660C, avatar_pos[0]) && //X
+ peekProc(0x01516610, avatar_pos[1]) && //Y
+ peekProc(0x0151A114, viewHor) && //Hor
+ peekProc(0x0151A110, viewVer); //Ver
if (! ok)
return false;