mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 01:38:17 +08:00
[saco] Implement/match ScrUnkAD; it is CActorPed::ApplyAnimation and reuses the ScrUnk56 bool read order of 1, 2, 4, 3
This commit is contained in:
1 parent
70b76e9806
commit
3f93cdf486
1 file changed
+41
-1
+41
-1
@@ -1403,7 +1403,47 @@ void ScrUnkA9(RPCParameters *rpcParams)
|
||||
}
|
||||
}
|
||||
}
|
||||
void ScrUnkAD(RPCParameters *rpcParams) {}
|
||||
void ScrUnkAD(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
ACTORID actorId;
|
||||
BYTE byteAnimFileLen;
|
||||
BYTE byteAnimNameLen;
|
||||
char szAnimFile[256];
|
||||
char szAnimName[256];
|
||||
float fT;
|
||||
bool bUnk1, bUnk2, bUnk3, bUnk4;
|
||||
int iUnk;
|
||||
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
|
||||
CActorPool *pActorPool = pNetGame->GetActorPool();
|
||||
if(pActorPool) {
|
||||
memset(szAnimFile, 0, sizeof(szAnimFile));
|
||||
memset(szAnimName, 0, sizeof(szAnimName));
|
||||
|
||||
bsData.Read(actorId);
|
||||
bsData.Read(byteAnimFileLen);
|
||||
bsData.Read(szAnimFile, byteAnimFileLen);
|
||||
bsData.Read(byteAnimNameLen);
|
||||
bsData.Read(szAnimName, byteAnimNameLen);
|
||||
bsData.Read(fT);
|
||||
bsData.Read(bUnk1);
|
||||
bsData.Read(bUnk2);
|
||||
bsData.Read(bUnk4);
|
||||
bsData.Read(bUnk3);
|
||||
bsData.Read(iUnk);
|
||||
|
||||
szAnimFile[byteAnimFileLen] = 0;
|
||||
szAnimName[byteAnimNameLen] = 0;
|
||||
|
||||
CActorPed *pActor = (CActorPed *)pActorPool->GetAt(actorId);
|
||||
if(pActor) pActor->ApplyAnimation(szAnimName, szAnimFile, fT, bUnk1, bUnk2, bUnk4, bUnk3, iUnk);
|
||||
}
|
||||
}
|
||||
void ScrUnkAE(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
|
||||
Reference in new issue
Block a user