mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 11:43:04 +08:00
[saco] Match CLocalPlayer::FUNC_10005AD0; the flag byte comes from a branch not setne, and the GTA id needs its own local to reuse esi
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
extern CGame *pGame;
|
||||
extern CNetGame *pNetGame;
|
||||
|
||||
DWORD dword_100FE0A4;
|
||||
|
||||
//----------------------------------------------------------
|
||||
|
||||
CLocalPlayer::CLocalPlayer()
|
||||
@@ -257,3 +259,34 @@ void CLocalPlayer::FUNC_10005BF0(WORD a1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// entering a vehicle; the camera hand-off only runs for the vehicles that ask
|
||||
void CLocalPlayer::FUNC_10005AD0(WORD a1, int a2)
|
||||
{
|
||||
RakNet::BitStream bsSend;
|
||||
|
||||
BYTE byteFlag = 0;
|
||||
|
||||
if(a2)
|
||||
byteFlag = 1;
|
||||
|
||||
bsSend.Write(a1);
|
||||
bsSend.Write(byteFlag);
|
||||
pNetGame->GetRakClient()->RPC(RPC_EnterVehicle, &bsSend, HIGH_PRIORITY, RELIABLE_SEQUENCED, 0, FALSE);
|
||||
|
||||
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
|
||||
|
||||
if(a1 < MAX_VEHICLES && pVehiclePool->field_3074[a1])
|
||||
{
|
||||
CVehicle *pVehicle = (CVehicle *)pVehiclePool->field_1134[a1];
|
||||
if(pVehicle && pVehicle->FUNC_100B7460())
|
||||
{
|
||||
DWORD dwGtaId = pVehicle->m_dwGTAId;
|
||||
|
||||
ScriptCommand(&camera_on_vehicle, dwGtaId, 3, 2);
|
||||
dword_100FE0A4 = GetTickCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ public:
|
||||
void SelectPreviousClass(); // .text:10006080
|
||||
void RequestClass(int iClass); // .text:100058D0
|
||||
void SendStatsUpdate(); // .text:10005D00
|
||||
void FUNC_10005AD0(WORD a1, int a2); // .text:10005AD0
|
||||
void FUNC_10005BF0(WORD a1); // .text:10005BF0
|
||||
void FUNC_10003570(); // .text:10003570
|
||||
|
||||
|
||||
Reference in New Issue
Block a user