From 14ed50a5591bacf857c33f78e6cef8c72ac8325d Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 24 Aug 2020 22:52:07 +0300 Subject: Remote done --- src/control/Remote.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/control/Remote.cpp') diff --git a/src/control/Remote.cpp b/src/control/Remote.cpp index 904e9023..714f9843 100644 --- a/src/control/Remote.cpp +++ b/src/control/Remote.cpp @@ -9,6 +9,8 @@ #include "PlayerInfo.h" #include "Vehicle.h" +//--MIAMI: file done + void CRemote::GivePlayerRemoteControlledCar(float x, float y, float z, float rot, uint16 model) { @@ -35,17 +37,24 @@ CRemote::GivePlayerRemoteControlledCar(float x, float y, float z, float rot, uin CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle = car; CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->RegisterReference((CEntity**)&CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle); - TheCamera.TakeControl(car, CCam::MODE_BEHINDCAR, INTERPOLATION, CAMCONTROL_SCRIPT); + if (car->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE || car->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI) { + TheCamera.TakeControl(car, CCam::MODE_CAM_ON_A_STRING, INTERPOLATION, CAMCONTROL_SCRIPT); + TheCamera.SetZoomValueCamStringScript(0); + } else + TheCamera.TakeControl(car, CCam::MODE_BEHINDCAR, INTERPOLATION, CAMCONTROL_SCRIPT); } void -CRemote::TakeRemoteControlledCarFromPlayer(void) +CRemote::TakeRemoteControlledCarFromPlayer(bool unk) { - CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->VehicleCreatedBy = RANDOM_VEHICLE; - CCarCtrl::NumMissionCars--; - CCarCtrl::NumRandomCars++; + if (CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->VehicleCreatedBy == MISSION_VEHICLE) { + CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->VehicleCreatedBy = RANDOM_VEHICLE; + CCarCtrl::NumMissionCars--; + CCarCtrl::NumRandomCars++; + } CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bIsLocked = false; CWorld::Players[CWorld::PlayerInFocus].m_nTimeLostRemoteCar = CTimer::GetTimeInMilliseconds(); CWorld::Players[CWorld::PlayerInFocus].m_bInRemoteMode = true; - CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bRemoveFromWorld = true; + CWorld::Players[CWorld::PlayerInFocus].field_D5 = unk; + CWorld::Players[CWorld::PlayerInFocus].field_D6 = true; } -- cgit v1.2.3 From 963e85f047965e0c0a1a8e50ca35e9368a2028b6 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 24 Aug 2020 23:01:51 +0300 Subject: Fix --- src/control/Remote.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control/Remote.cpp') diff --git a/src/control/Remote.cpp b/src/control/Remote.cpp index 714f9843..164a2f4c 100644 --- a/src/control/Remote.cpp +++ b/src/control/Remote.cpp @@ -45,7 +45,7 @@ CRemote::GivePlayerRemoteControlledCar(float x, float y, float z, float rot, uin } void -CRemote::TakeRemoteControlledCarFromPlayer(bool unk) +CRemote::TakeRemoteControlledCarFromPlayer(bool blowUp) { if (CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->VehicleCreatedBy == MISSION_VEHICLE) { CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->VehicleCreatedBy = RANDOM_VEHICLE; @@ -55,6 +55,6 @@ CRemote::TakeRemoteControlledCarFromPlayer(bool unk) CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->bIsLocked = false; CWorld::Players[CWorld::PlayerInFocus].m_nTimeLostRemoteCar = CTimer::GetTimeInMilliseconds(); CWorld::Players[CWorld::PlayerInFocus].m_bInRemoteMode = true; - CWorld::Players[CWorld::PlayerInFocus].field_D5 = unk; + CWorld::Players[CWorld::PlayerInFocus].field_D5 = blowUp; CWorld::Players[CWorld::PlayerInFocus].field_D6 = true; } -- cgit v1.2.3