[saco] Match WorldPlayerRemove; it re-fetches the pool for the GetAt lookup

This commit is contained in:
ricardoofnl
2026-09-03 00:27:43 +07:00
parent 8a582bc5e0
commit 7121aed4c9
+19 -1
View File
@@ -162,7 +162,25 @@ void WorldPlayerDeath(RPCParameters *rpcParams)
pRemotePlayer->FUNC_10017570();
}
}
void WorldPlayerRemove(RPCParameters *rpcParams) {}
void WorldPlayerRemove(RPCParameters *rpcParams)
{
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
int iBitLength = rpcParams->numberOfBitsOfData;
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
PLAYERID playerId = 0;
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
bsData.Read(playerId);
if(pPlayerPool)
{
CRemotePlayer *pRemotePlayer = pNetGame->GetPlayerPool()->GetAt(playerId);
if(pRemotePlayer)
pRemotePlayer->FUNC_10017530();
}
}
void WorldVehicleAdd(RPCParameters *rpcParams) {}
void WorldVehicleRemove(RPCParameters *rpcParams) {}
void DamageVehicle(RPCParameters *rpcParams) {}