diff options
author | bogie <priivet@gmail.com> | 2012-12-16 18:38:20 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2012-12-20 23:28:49 +0400 |
commit | 14f10e5329acedc62b79f2648481eb6c0103efcd (patch) | |
tree | 3eb8ceab5e1597bb6780d4fe3275814dbb3b8cd4 /plugins/bf3 | |
parent | e9ce44abf92ef9358677f7a05fda9263836c6ddc (diff) |
Update bf3 PA plugin
- used more reliable pointer chains
- added some documentation
Diffstat (limited to 'plugins/bf3')
-rw-r--r-- | plugins/bf3/bf3.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/bf3/bf3.cpp b/plugins/bf3/bf3.cpp index 254227b3d..419dc20b9 100644 --- a/plugins/bf3/bf3.cpp +++ b/plugins/bf3/bf3.cpp @@ -36,7 +36,7 @@ static bool ptr_chain_valid = false; static BYTE *pmodule_bf3; // Magic ptrs -static BYTE* const state_ptr = (BYTE *) 0x02347E3C; +static BYTE* const state_ptr = (BYTE *) 0x234CCCC; // Vector ptrs static BYTE* const avatar_pos_ptr = (BYTE *) 0x0234CC60; @@ -52,8 +52,8 @@ static BYTE *squad_state_ptr; static BYTE *squad_lead_state_ptr; // Offsets -static const int base_offset = 0x01F42AE4; -static const int identity_offset1 = 0x8; +static const int base_offset = 0x01F42AF0; +static const int identity_offset1 = 0x1C; static const int identity_offset2 = 0xBC; static const int identity_offset3 = 0x36C; static const int identity_offset4 = 0x8; @@ -63,15 +63,23 @@ static const int team_state_offset = 0x31C; enum state_values { STATE_UNKN = 0, - STATE_IN_GAME = 1, - STATE_IN_MENU = 2, - STATE_LOADING = 3 + STATE_LOADING = 1, + STATE_IN_GAME = 2, + STATE_IN_MENU = 3 }; inline bool resolve_ptrs() { team_state_ptr = squad_state_ptr = squad_lead_state_ptr = NULL; /* + Analysis for future patches: + + - state_ptr is always 0x6C after avatar_pos_ptr + - avatar_front_ptr is always 0x30 after avatar_pos_ptr + - avatar_top_ptr is always 0x20 after avatar_pos_ptr + - you can find avatar_pos_ptr easily by jumping in a jet and search for altitude + */ + /* Magic: state : 0x02347E3C BYTE 1 when playing 2 while in menu/dead |