mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[saco] Match Pickup; the payload is a 20-byte PICKUP read straight off the stream
This commit is contained in:
+16
-1
@@ -56,7 +56,22 @@ void WorldTime(RPCParameters *rpcParams)
|
||||
|
||||
pNetGame->SetWorldTime(byteWorldTime);
|
||||
}
|
||||
void Pickup(RPCParameters *rpcParams) {}
|
||||
void Pickup(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(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<PCHAR>(rpcParams->input);
|
||||
|
||||
@@ -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
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user