mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 03:33:04 +08:00
[saco] Match FUNC_10004280; GetAt is called twice and the pool bound check folds into GetSlotState
This commit is contained in:
@@ -571,3 +571,19 @@ void CLocalPlayer::FUNC_100041C0(BOOL bSpectating)
|
||||
field_314 = 0;
|
||||
field_310 = -1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// picks a player to spectate; state 32 is not a spectatable one
|
||||
void CLocalPlayer::FUNC_10004280(PLAYERID playerId)
|
||||
{
|
||||
CPlayerPool *pPlayerPool = pNetGame->GetPlayerPool();
|
||||
|
||||
if(pPlayerPool && pPlayerPool->GetSlotState(playerId) && pPlayerPool->GetAt(playerId)->field_10A
|
||||
&& pPlayerPool->GetAt(playerId)->field_10A != 32)
|
||||
{
|
||||
field_30F = 1;
|
||||
field_310 = playerId;
|
||||
field_314 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,6 +151,7 @@ public:
|
||||
BOOL FUNC_10003A60(void *a2, void *a3, unsigned int a4); // .text:10003A60
|
||||
void FUNC_10004080(); // .text:10004080
|
||||
void FUNC_10004230(WORD a1); // .text:10004230
|
||||
void FUNC_10004280(PLAYERID playerId); // .text:10004280
|
||||
void FUNC_10003F50(); // .text:10003F50
|
||||
void FUNC_100041C0(BOOL bSpectating); // .text:100041C0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user