Skip to content

Commit

Permalink
Indentation fix
Browse files Browse the repository at this point in the history
Replaced spaces with tabs, to match the rest of the code.
  • Loading branch information
davidebeatrici committed Oct 27, 2016
1 parent d709981 commit 4176e42
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/bf1/bf1.cpp
Expand Up @@ -48,16 +48,16 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
if (!team_offset_2) return false;

// Squad pointers
procptr64_t squad_base = peekProc<procptr64_t>(pModule + 0x31016D0);
procptr64_t squad_base = peekProc<procptr64_t>(pModule + 0x31016D0);
if (!squad_base) return false;
procptr64_t squad_offset_0 = peekProc<procptr64_t>(squad_base + 0x30);
procptr64_t squad_offset_0 = peekProc<procptr64_t>(squad_base + 0x30);
if (!squad_offset_0) return false;
procptr64_t squad_offset_1 = peekProc<procptr64_t>(squad_offset_0 + 0x578);
procptr64_t squad_offset_1 = peekProc<procptr64_t>(squad_offset_0 + 0x578);
if (!squad_offset_1) return false;
procptr64_t squad_offset_2 = peekProc<procptr64_t>(squad_offset_1 + 0xC0);
procptr64_t squad_offset_2 = peekProc<procptr64_t>(squad_offset_1 + 0xC0);
if (!squad_offset_2) return false;
procptr64_t squad_offset_3 = peekProc<procptr64_t>(squad_offset_2 + 0x58);
if (!squad_offset_3) return false;
procptr64_t squad_offset_3 = peekProc<procptr64_t>(squad_offset_2 + 0x58);
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.
Expand All @@ -67,8 +67,8 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa
peekProc(camera_base + 0x250, camera_top, 12) && // Avatar top vector values (X, Y and Z).
peekProc(server_name_offset, 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 + 0xDCC, squad_leader); // Squad leader value: 0 (False), 1 (True).
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 + 0xDCC, squad_leader); // Squad leader value: 0 (False), 1 (True).

// This prevents the plugin from linking to the game in case something goes wrong during values retrieval from memory addresses.
if (!ok) {
Expand Down

0 comments on commit 4176e42

Please sign in to comment.