From 0d9a1c9f3c3b0640883bf17ceba0d87224529c06 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Sat, 5 Sep 2026 10:02:14 +0700 Subject: [PATCH] [saco] Implement/match `ScrUnk5A`; `FUNC_100ABDD0` and `FUNC_100ABDF0` take `ecx`, so both are `CPlayerPed` methods and the xor feeds the setter --- saco/game/playerped.h | 2 ++ saco/net/scriptrpc.cpp | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/saco/game/playerped.h b/saco/game/playerped.h index b3a545a..73abdee 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -211,6 +211,8 @@ public: BOOL FUNC_100ACE40(); // .text:100ACE40 void FUNC_100ACF00(int a1); // .text:100ACF00 BOOL FUNC_100AD860(); // .text:100AD860 + int FUNC_100ABDD0(); // .text:100ABDD0 + void FUNC_100ABDF0(int a1); // .text:100ABDF0 void FUNC_100AD880(); // .text:100AD880 void FUNC_100AC720(); // .text:100AC720 void FUNC_100AEC90(); // .text:100AEC90 diff --git a/saco/net/scriptrpc.cpp b/saco/net/scriptrpc.cpp index 98e0f79..6d63f28 100644 --- a/saco/net/scriptrpc.cpp +++ b/saco/net/scriptrpc.cpp @@ -708,7 +708,29 @@ void ScrUnk58(RPCParameters *rpcParams) if(pPlayerPool) pPlayerPool->GetLocalPlayer()->sub_100030F0(byteUnk); } void ScrUnk59(RPCParameters *rpcParams) {} -void ScrUnk5A(RPCParameters *rpcParams) {} +void ScrUnk5A(RPCParameters *rpcParams) +{ + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + PlayerID sender = rpcParams->sender; + + VECTOR vecMoveSpeed; + + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + + bsData.Read(vecMoveSpeed.X); + bsData.Read(vecMoveSpeed.Y); + bsData.Read(vecMoveSpeed.Z); + + CPlayerPed *pPlayerPed = pGame->FindPlayerPed(); + if(pPlayerPed) { + if(pPlayerPed->FUNC_100AD860()) { + pPlayerPed->FUNC_100ABDF0(pPlayerPed->FUNC_100ABDD0() ^ 3); + } + + pPlayerPed->SetMoveSpeedVector(vecMoveSpeed); + } +} void ScrUnk5B(RPCParameters *rpcParams) { PCHAR Data = reinterpret_cast(rpcParams->input);