summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-08 21:45:37 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-08 21:45:37 +0200
commit570ccb7db1c94bf9adf62a8809dfa648139a3915 (patch)
tree8dadceb031c51a2cffc6fccd7600c95a16fd45e1 /src/vehicles
parentupdate librw (diff)
parentMerge pull request #756 from erorcun/miami (diff)
downloadre3-570ccb7db1c94bf9adf62a8809dfa648139a3915.tar
re3-570ccb7db1c94bf9adf62a8809dfa648139a3915.tar.gz
re3-570ccb7db1c94bf9adf62a8809dfa648139a3915.tar.bz2
re3-570ccb7db1c94bf9adf62a8809dfa648139a3915.tar.lz
re3-570ccb7db1c94bf9adf62a8809dfa648139a3915.tar.xz
re3-570ccb7db1c94bf9adf62a8809dfa648139a3915.tar.zst
re3-570ccb7db1c94bf9adf62a8809dfa648139a3915.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp4
-rw-r--r--src/vehicles/Boat.cpp11
-rw-r--r--src/vehicles/Vehicle.cpp2
-rw-r--r--src/vehicles/Vehicle.h2
4 files changed, 15 insertions, 4 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 01a4f094..1316985d 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -841,8 +841,8 @@ CAutomobile::ProcessControl(void)
m_nBusDoorTimerEnd -= CTimer::GetTimeStepInMilliseconds();
}
- if(m_aSuspensionSpringRatio[0] < 1.0f || m_aSuspensionSpringRatio[1] < 1.0f ||
- m_aSuspensionSpringRatio[2] < 1.0f || m_aSuspensionSpringRatio[3] < 1.0f)
+ if((m_aSuspensionSpringRatio[0] < 1.0f || m_aSuspensionSpringRatio[2] < 1.0f) &&
+ (m_aSuspensionSpringRatio[1] < 1.0f || m_aSuspensionSpringRatio[3] < 1.0f))
ApplyTurnForce(-GRAVITY*Min(m_fTurnMass, 2500.0f)*GetUp(), -1.0f*GetForward());
}
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 1664ffd0..8c9dd241 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -959,17 +959,24 @@ CBoat::PreRender(void)
matrix.Translate(pos);
matrix.UpdateRW();
}
+ // FIX: Planes can also be controlled with GetCarGunUpDown
+#ifdef FIX_BUGS
+ static float steeringUpDown = 0.0f;
+ steeringUpDown += ((Abs(CPad::GetPad(0)->GetCarGunUpDown()) > 1.0f ? (-CPad::GetPad(0)->GetCarGunUpDown() / 128.0f) : (-CPad::GetPad(0)->GetSteeringUpDown() / 128.0f)) - steeringUpDown) * Min(1.f, CTimer::GetTimeStep() / 5.f);
+#else
+ float steeringUpDown = -CPad::GetPad(0)->GetSteeringUpDown()/128.0f;
+#endif
if(m_aBoatNodes[BOAT_REARFLAP_LEFT]){
matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_REARFLAP_LEFT]));
pos = matrix.GetPosition();
- matrix.SetRotateX(-CPad::GetPad(0)->GetSteeringUpDown()/128.0f);
+ matrix.SetRotateX(steeringUpDown);
matrix.Translate(pos);
matrix.UpdateRW();
}
if(m_aBoatNodes[BOAT_REARFLAP_RIGHT]){
matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_REARFLAP_RIGHT]));
pos = matrix.GetPosition();
- matrix.SetRotateX(-CPad::GetPad(0)->GetSteeringUpDown()/128.0f);
+ matrix.SetRotateX(steeringUpDown);
matrix.Translate(pos);
matrix.UpdateRW();
}
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index e3d73771..6e86dbe4 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -41,6 +41,8 @@ bool CVehicle::bCheat3;
bool CVehicle::bCheat4;
bool CVehicle::bCheat5;
bool CVehicle::bCheat8;
+bool CVehicle::bCheat9;
+bool CVehicle::bCheat10;
bool CVehicle::bHoverCheat;
bool CVehicle::bAllTaxisHaveNitro;
bool CVehicle::m_bDisableMouseSteering = true;
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index ae969921..004f1fd9 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -400,6 +400,8 @@ public:
static bool bCheat4;
static bool bCheat5;
static bool bCheat8;
+ static bool bCheat9;
+ static bool bCheat10;
static bool bHoverCheat;
static bool bAllTaxisHaveNitro;
static bool m_bDisableMouseSteering;