summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-08-24 21:52:07 +0200
committerSergeanur <s.anureev@yandex.ua>2020-08-24 21:52:07 +0200
commit14ed50a5591bacf857c33f78e6cef8c72ac8325d (patch)
tree86ce995352bd6f9ab2f14a83d8e735518f492a47 /src/control
parentPlayerSkin done (diff)
downloadre3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.tar
re3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.tar.gz
re3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.tar.bz2
re3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.tar.lz
re3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.tar.xz
re3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.tar.zst
re3-14ed50a5591bacf857c33f78e6cef8c72ac8325d.zip
Diffstat (limited to '')
-rw-r--r--src/control/Remote.cpp21
-rw-r--r--src/control/Remote.h2
2 files changed, 16 insertions, 7 deletions
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;
}
diff --git a/src/control/Remote.h b/src/control/Remote.h
index 5e474586..250641ca 100644
--- a/src/control/Remote.h
+++ b/src/control/Remote.h
@@ -4,5 +4,5 @@ class CRemote
{
public:
static void GivePlayerRemoteControlledCar(float, float, float, float, uint16);
- static void TakeRemoteControlledCarFromPlayer(void);
+ static void TakeRemoteControlledCarFromPlayer(bool);
};