diff --git a/saco/net/localplayer.cpp b/saco/net/localplayer.cpp index 45cd873..78f15bd 100644 --- a/saco/net/localplayer.cpp +++ b/saco/net/localplayer.cpp @@ -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(); + } + } +} diff --git a/saco/net/localplayer.h b/saco/net/localplayer.h index 819585a..6299dfc 100644 --- a/saco/net/localplayer.h +++ b/saco/net/localplayer.h @@ -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