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:
authorRobert Adam <dev@robert-adam.de>2020-09-02 21:18:46 +0300
committerRobert <krzmbrzl@gmail.com>2020-09-11 19:28:38 +0300
commit40b28b03c150b453e00c6bc4f8d6957caea59c51 (patch)
tree94229c630ce61a520aead0e6f05da2e87aed546a /plugins
parent09acf39e4c48267deb2fa582107053276877feb9 (diff)
FORMAT: Move explanatory comments to own line
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bf1/bf1.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/plugins/bf1/bf1.cpp b/plugins/bf1/bf1.cpp
index b3db7c9fd..20d9e7a66 100644
--- a/plugins/bf1/bf1.cpp
+++ b/plugins/bf1/bf1.cpp
@@ -64,15 +64,25 @@ 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 + 0x36B1500, 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).
- peekProc(server_name_offset_2, 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).
- peekProc(squad_offset_3 + 0x244, squad_leader); // Squad leader value: 0 (False), 1 (True).
+
+ // Magical state value: 1 when in-game and 0 when not spawned or playing.
+ ok = peekProc(state_offset_3 + 0x50, &state, 1)
+ // Avatar position values (X, Y and Z).
+ && peekProc(pModule + 0x36B1500, avatar_pos, 12)
+ // Camera position values (X, Y and Z).
+ && peekProc(camera_base + 0x2B0, camera_pos, 12)
+ // Avatar front vector values (X, Y and Z).
+ && peekProc(camera_base + 0x260, camera_front, 12)
+ // Avatar top vector values (X, Y and Z).
+ && peekProc(camera_base + 0x250, camera_top, 12)
+ // Server name.
+ && peekProc(server_name_offset_2, server_name)
+ // Team name.
+ && peekProc(team_offset_2 + 0x13, team)
+ // Squad value: 0 (not in a squad), 1 (Apples), 2 (Butter), 3 (Charlie)... 26 (Zebra).
+ && peekProc(squad_offset_3 + 0x240, squad)
+ // Squad leader value: 0 (False), 1 (True).
+ && peekProc(squad_offset_3 + 0x244, squad_leader);
// This prevents the plugin from linking to the game in case something goes wrong during values retrieval from memory addresses.
if (!ok) {