summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Boat.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-10 11:25:30 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-10 11:25:30 +0200
commit2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e (patch)
tree24ca53597b1ebf632b12fb315ef91e899807d47d /src/vehicles/Boat.cpp
parentMerge pull request #528 from Nick007J/miami (diff)
downloadre3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar
re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.gz
re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.bz2
re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.lz
re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.xz
re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.zst
re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Boat.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 5879717a..261a8426 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -3,6 +3,7 @@
#include "General.h"
#include "Timecycle.h"
#include "HandlingMgr.h"
+#include "CarAI.h"
#include "CarCtrl.h"
#include "RwHelper.h"
#include "ModelIndices.h"
@@ -152,6 +153,7 @@ CBoat::ProcessControl(void)
case STATUS_SIMPLE:
m_bIsAnchored = false;
m_fOrientation = INVALID_ORIENTATION;
+ CCarAI::UpdateCarAI(this);
CPhysical::ProcessControl();
bBoatInWater = true;
bPropellerInWater = true;
@@ -160,7 +162,8 @@ CBoat::ProcessControl(void)
case STATUS_PHYSICS:
m_bIsAnchored = false;
m_fOrientation = INVALID_ORIENTATION;
- CCarCtrl::SteerAIBoatWithPhysics(this);
+ CCarAI::UpdateCarAI(this);
+ CCarCtrl::SteerAICarWithPhysics(this);
break;
case STATUS_ABANDONED:
case STATUS_WRECKED:
@@ -398,9 +401,9 @@ CBoat::ProcessControl(void)
}
// Slow down or push down boat as it approaches the world limits
- m_vecMoveSpeed.x = Min(m_vecMoveSpeed.x, -(GetPosition().x - 1900.0f)*0.01f); // east
- m_vecMoveSpeed.x = Max(m_vecMoveSpeed.x, -(GetPosition().x - -1515.0f)*0.01f); // west
- m_vecMoveSpeed.y = Min(m_vecMoveSpeed.y, -(GetPosition().y - 600.0f)*0.01f); // north
+ m_vecMoveSpeed.x = Min(m_vecMoveSpeed.x, -(GetPosition().x - 1500.0f)*0.01f); // east
+ m_vecMoveSpeed.x = Max(m_vecMoveSpeed.x, -(GetPosition().x - -2300.0f)*0.01f); // west
+ m_vecMoveSpeed.y = Min(m_vecMoveSpeed.y, -(GetPosition().y - 1900.0f)*0.01f); // north
m_vecMoveSpeed.y = Max(m_vecMoveSpeed.y, -(GetPosition().y - -1900.0f)*0.01f); // south
if(!onLand && bBoatInWater)