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/wolfet
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/wolfet')
-rw-r--r--plugins/wolfet/wolfet.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/wolfet/wolfet.cpp b/plugins/wolfet/wolfet.cpp
index a8463acac..06119ea44 100644
--- a/plugins/wolfet/wolfet.cpp
+++ b/plugins/wolfet/wolfet.cpp
@@ -57,7 +57,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
avatar_pos[i] = avatar_front[i] = avatar_top[i] = camera_pos[i] = camera_front[i] = camera_top[i] = 0.0f;
bool ok;
- ok = peekProc(0x013E8DFC, &team, 1);
+ ok = peekProc(0x013E8DFC, team);
if (!ok)
return false;
@@ -65,9 +65,9 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
if (team == 0 || team == 3)
return true;
- ok = peekProc(0x013E8CF4, avatar_pos, 12) && // X, Y, Z
- peekProc(0x013F9E20, &viewHor, 4) && // Hor-Angle
- peekProc(0x013F9E1C, &viewVer, 4); // Ver-Angle
+ ok = peekProc(0x013E8CF4, avatar_pos) && // X, Y, Z
+ peekProc(0x013F9E20, viewHor) && // Hor-Angle
+ peekProc(0x013F9E1C, viewVer); // Ver-Angle
if (!ok)
return false;
@@ -91,8 +91,8 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
// Context - concatenated server-ip, mapname and team value
char hostip[32];
char mapname[40];
- ok = peekProc(0x009FFD30, hostip, sizeof(hostip)) &&
- peekProc(0x010B4908, mapname, sizeof(hostip));
+ ok = peekProc(0x009FFD30, hostip) &&
+ peekProc(0x010B4908, mapname);
hostip[sizeof(hostip)-1] = '\0';
mapname[sizeof(mapname)-1] = '\0';
// Context in JSON format, {} with fields ipport (server hostname), map, and team (: int)