From 71a9be0c832a0e1545af41f145ce22ae07f9ab08 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Thu, 3 Sep 2026 00:22:32 +0700 Subject: [PATCH] [saco] Match `Pickup`; the payload is a 20-byte PICKUP read straight off the stream --- saco/net/netrpc.cpp | 17 ++++++++++++++++- saco/net/pickuppool.h | 10 ++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/saco/net/netrpc.cpp b/saco/net/netrpc.cpp index 0983118..4f68221 100644 --- a/saco/net/netrpc.cpp +++ b/saco/net/netrpc.cpp @@ -56,7 +56,22 @@ void WorldTime(RPCParameters *rpcParams) pNetGame->SetWorldTime(byteWorldTime); } -void Pickup(RPCParameters *rpcParams) {} +void Pickup(RPCParameters *rpcParams) +{ + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + + int iPickup; + PICKUP Pickup; + + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + bsData.Read(iPickup); + bsData.Read((PCHAR)&Pickup,sizeof(PICKUP)); + + CPickupPool *pPickupPool = pNetGame->GetPickupPool(); + if(pPickupPool) + pPickupPool->sub_10013270(&Pickup,iPickup); +} void DestroyPickup(RPCParameters *rpcParams) { PCHAR Data = reinterpret_cast(rpcParams->input); diff --git a/saco/net/pickuppool.h b/saco/net/pickuppool.h index c8a0721..eeb5bb9 100644 --- a/saco/net/pickuppool.h +++ b/saco/net/pickuppool.h @@ -3,6 +3,15 @@ #define MAX_PICKUPS 4096 +#pragma pack(1) +typedef struct _PICKUP { + int iModel; + int iType; + float fX; + float fY; + float fZ; +} PICKUP, *PPICKUP; + //---------------------------------------------------- class CPickupPool @@ -35,6 +44,7 @@ public: void sub_10013440(int iPickup); // .text:10013440 void sub_10013320(int iPickup); // .text:10013320 + void sub_10013270(PICKUP *pPickup, int iPickup); // .text:10013270 void sub_10013380(WORD wPickup); // .text:10013380 };