summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Automobile.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-10-07 23:59:10 +0200
committerGitHub <noreply@github.com>2020-10-07 23:59:10 +0200
commit8b7bf76260ab7577a230cc37b42e149234513e6e (patch)
tree4a0fd8df8835de36d252de5fefb796b07edac4a4 /src/vehicles/Automobile.cpp
parentFix build on clang (diff)
parentback to the future style wheels on flying (diff)
downloadre3-8b7bf76260ab7577a230cc37b42e149234513e6e.tar
re3-8b7bf76260ab7577a230cc37b42e149234513e6e.tar.gz
re3-8b7bf76260ab7577a230cc37b42e149234513e6e.tar.bz2
re3-8b7bf76260ab7577a230cc37b42e149234513e6e.tar.lz
re3-8b7bf76260ab7577a230cc37b42e149234513e6e.tar.xz
re3-8b7bf76260ab7577a230cc37b42e149234513e6e.tar.zst
re3-8b7bf76260ab7577a230cc37b42e149234513e6e.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Automobile.cpp39
1 files changed, 29 insertions, 10 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 05596e75..01a4f094 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -1375,6 +1375,10 @@ CAutomobile::ProcessControl(void)
// Flying
bool playRotorSound = false;
+ bool isPlane = GetModelIndex() == MI_DODO || bAllDodosCheat;
+#ifdef FIX_BUGS
+ isPlane = isPlane && !IsRealHeli();
+#endif
if(GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && GetStatus() != STATUS_PHYSICS){
if(IsRealHeli()){
bEngineOn = false;
@@ -1383,16 +1387,7 @@ CAutomobile::ProcessControl(void)
if(m_aWheelSpeed[1] < 0.154f && m_aWheelSpeed[1] > 0.0044f)
playRotorSound = true;
}
- }else if((GetModelIndex() == MI_DODO || CVehicle::bAllDodosCheat) &&
-#ifdef FIX_BUGS
- !IsRealHeli() &&
-#endif
- m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
-#ifdef ALT_DODO_CHEAT
- if (bAltDodoCheat)
- FlyingControl(FLIGHT_MODEL_PLANE);
- else
-#endif
+ }else if(isPlane && m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
if(GetModelIndex() == MI_DODO)
FlyingControl(FLIGHT_MODEL_DODO);
else
@@ -2594,6 +2589,10 @@ CAutomobile::PreRender(void)
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
}
+#ifdef BETTER_ALLCARSAREDODO_CHEAT
+ } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
+ mat.RotateY(-HALFPI);
+#endif
}else{
// tilt wheel depending oh how much it presses on ground
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
@@ -2631,6 +2630,10 @@ CAutomobile::PreRender(void)
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
}
+#ifdef BETTER_ALLCARSAREDODO_CHEAT
+ } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
+ mat.RotateY(HALFPI);
+#endif
}else{
// tilt wheel depending oh how much it presses on ground
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
@@ -2660,6 +2663,10 @@ CAutomobile::PreRender(void)
m_aWheelColPoints[CARWHEEL_REAR_RIGHT].surfaceB == SURFACE_WATER){
// hovering on water
mat.RotateY(-HALFPI);
+#ifdef BETTER_ALLCARSAREDODO_CHEAT
+ } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
+ mat.RotateY(-HALFPI);
+#endif
}else{
// tilt wheel depending oh how much it presses on ground
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
@@ -2690,6 +2697,10 @@ CAutomobile::PreRender(void)
m_aWheelColPoints[CARWHEEL_REAR_LEFT].surfaceB == SURFACE_WATER){
// hovering on water
mat.RotateY(HALFPI);
+#ifdef BETTER_ALLCARSAREDODO_CHEAT
+ } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
+ mat.RotateY(HALFPI);
+#endif
}else{
// tilt wheel depending oh how much it presses on ground
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
@@ -2820,6 +2831,10 @@ CAutomobile::PreRender(void)
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
}
+#ifdef BETTER_ALLCARSAREDODO_CHEAT
+ } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
+ mat.RotateY(-HALFPI);
+#endif
}else{
// tilt wheel depending oh how much it presses on ground
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;
@@ -2857,6 +2872,10 @@ CAutomobile::PreRender(void)
CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1);
}
+#ifdef BETTER_ALLCARSAREDODO_CHEAT
+ } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) {
+ mat.RotateY(HALFPI);
+#endif
}else{
// tilt wheel depending oh how much it presses on ground
float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;