summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Boat.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-10-08 20:39:11 +0200
committerGitHub <noreply@github.com>2020-10-08 20:39:11 +0200
commitb97f86deeaa80705941de14b95d32e801cae837f (patch)
tree8c286f6992a58fc3db885a5579b0d49a22f30e68 /src/vehicles/Boat.cpp
parentMerge pull request #755 from theR4K/miami (diff)
parentMerge branch 'miami' into miami (diff)
downloadre3-b97f86deeaa80705941de14b95d32e801cae837f.tar
re3-b97f86deeaa80705941de14b95d32e801cae837f.tar.gz
re3-b97f86deeaa80705941de14b95d32e801cae837f.tar.bz2
re3-b97f86deeaa80705941de14b95d32e801cae837f.tar.lz
re3-b97f86deeaa80705941de14b95d32e801cae837f.tar.xz
re3-b97f86deeaa80705941de14b95d32e801cae837f.tar.zst
re3-b97f86deeaa80705941de14b95d32e801cae837f.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Boat.cpp11
1 files changed, 9 insertions, 2 deletions
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();
}