diff --git a/saco/net/labelpool.h b/saco/net/labelpool.h index 6712700..6e8a98d 100644 --- a/saco/net/labelpool.h +++ b/saco/net/labelpool.h @@ -20,4 +20,8 @@ public: void FUNC_10001350(); // .text:10001350 + // .text:100011D0 + void sub_100011D0(WORD wLabelID, PCHAR szText, DWORD dwColor, float fX, float fY, float fZ, + float fDrawDistance, BYTE byteShowBehindWalls, WORD wAttachedPlayer, WORD wAttachedVehicle); + }; diff --git a/saco/net/netrpc.cpp b/saco/net/netrpc.cpp index 6be880d..01477e7 100644 --- a/saco/net/netrpc.cpp +++ b/saco/net/netrpc.cpp @@ -1,5 +1,6 @@ #include "../main.h" +#include "../../raknet/StringCompressor.h" extern CNetGame* pNetGame; extern CGame * pGame; @@ -113,7 +114,46 @@ void Unk22(RPCParameters *rpcParams) } } } -void Unk24(RPCParameters *rpcParams) {} +void Unk24(RPCParameters *rpcParams) +{ + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + + WORD wLabelID; + DWORD dwColor; + float fX, fY, fZ; + float fDrawDistance; + WORD wAttachedPlayer; + WORD wAttachedVehicle; + char szText[2049]; + + CLabelPool *pLabelPool = pNetGame->GetLabelPool(); + + if(pLabelPool) + { + BYTE byteShowBehindWalls = 0; + + memset(szText,0,sizeof(szText)); + + bsData.Read(wLabelID); + bsData.Read(dwColor); + bsData.Read(fX); + bsData.Read(fY); + bsData.Read(fZ); + bsData.Read(fDrawDistance); + bsData.Read(byteShowBehindWalls); + bsData.Read(wAttachedPlayer); + bsData.Read(wAttachedVehicle); + + stringCompressor->DecodeString(szText,2048,&bsData); + + if(wLabelID < MAX_LABELS) + pLabelPool->sub_100011D0(wLabelID,szText,dwColor,fX,fY,fZ,fDrawDistance, + byteShowBehindWalls,wAttachedPlayer,wAttachedVehicle); + } +} // MATCH void Unk3A(RPCParameters *rpcParams) {