mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[saco] Implement/match ScrUnk45; its local-player arm inlines a new CLocalPlayer::SetTeam, whose COMDAT is the body at 0x10017C70
This commit is contained in:
+23
-1
@@ -408,7 +408,29 @@ void ScrSetSpawnInfo(RPCParameters *rpcParams)
|
||||
|
||||
pPlayerPool->GetLocalPlayer()->sub_10003BE0(&SpawnInfo);
|
||||
}
|
||||
void ScrUnk45(RPCParameters *rpcParams) {}
|
||||
void ScrUnk45(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
PLAYERID playerId;
|
||||
BYTE byteTeam;
|
||||
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
|
||||
bsData.Read(playerId);
|
||||
bsData.Read(byteTeam);
|
||||
|
||||
if(playerId == pPlayerPool->GetLocalPlayerID()) {
|
||||
pPlayerPool->GetLocalPlayer()->SetTeam(byteTeam);
|
||||
} else {
|
||||
CRemotePlayer *pRemotePlayer = pPlayerPool->GetAt(playerId);
|
||||
if(pRemotePlayer) pRemotePlayer->field_109 = byteTeam;
|
||||
}
|
||||
}
|
||||
void ScrUnk99(RPCParameters *rpcParams)
|
||||
{
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
|
||||
Reference in New Issue
Block a user