From 375a1b3aa3c101845a8cd3b9e63e038d1226cf5b Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Sat, 5 Sep 2026 09:00:12 +0700 Subject: [PATCH] [saco] Match four small `CLocalPlayer` members; the `1000` fallback has to be the trailing else, and the three key words are read through `field_0` --- saco/net/localplayer.cpp | 46 ++++++++++++++++++++++++++++++++++++++++ saco/net/localplayer.h | 6 ++++++ 2 files changed, 52 insertions(+) diff --git a/saco/net/localplayer.cpp b/saco/net/localplayer.cpp index 128275a..843b1dc 100644 --- a/saco/net/localplayer.cpp +++ b/saco/net/localplayer.cpp @@ -317,3 +317,49 @@ void CLocalPlayer::FUNC_10006FE0() } } } + +//---------------------------------------------------- + +void CLocalPlayer::sub_10003710(int a1, int a2) +{ + field_2DA = a1; + field_2DE = a2; +} + +//---------------------------------------------------- + +void CLocalPlayer::sub_10004060() +{ + if(field_306) + { + FUNC_10003B60(); + field_302 = 1; + } +} + +//---------------------------------------------------- + +// on foot and in a vehicle report their update rate separately +int CLocalPlayer::FUNC_10003B30() +{ + if(m_pPlayerPed) + { + if(m_pPlayerPed->IsInVehicle()) + return FUNC_10003AB0(); + + return FUNC_10003AF0(); + } + + return 1000; +} + +//---------------------------------------------------- + +// the three words live inside field_0, so they are read through it +BOOL CLocalPlayer::FUNC_10004340(WORD a1, WORD a2, WORD a3) +{ + if(a1 == *(WORD *)&field_0[6] && a2 == *(WORD *)&field_0[4] && a3 == *(WORD *)&field_0[2]) + return FALSE; + + return TRUE; +} diff --git a/saco/net/localplayer.h b/saco/net/localplayer.h index e28abcd..319f79b 100644 --- a/saco/net/localplayer.h +++ b/saco/net/localplayer.h @@ -138,6 +138,12 @@ public: void sub_100041C0(int a1); // .text:100041C0 void sub_100030F0(BYTE a1); // .text:100030F0 void sub_10003710(int a1, int a2); // .text:10003710 + void sub_10004060(); // .text:10004060 + int FUNC_10003AB0(); // .text:10003AB0 + int FUNC_10003AF0(); // .text:10003AF0 + int FUNC_10003B30(); // .text:10003B30 + void FUNC_10003B60(); // .text:10003B60 + BOOL FUNC_10004340(WORD a1, WORD a2, WORD a3); // .text:10004340 DWORD GetField_F0() { return field_F0; }; };