summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Boat.cpp2
-rw-r--r--src/vehicles/Train.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 2da58ed7..63abba20 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -920,6 +920,8 @@ CBoat::AddWakePoint(CVector point)
}
m_avec2dWakePoints[0] = point;
m_afWakePointLifeTime[0] = 400.0f;
+ if(m_nNumWakePoints < ARRAY_SIZE(m_afWakePointLifeTime))
+ m_nNumWakePoints++;
}
}else{
m_avec2dWakePoints[0] = point;
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index 50f7cb1d..546f72c2 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -663,8 +663,8 @@ PlayAnnouncement(uint8 sound, uint8 station)
void
ProcessTrainAnnouncements(void)
{
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 3; j++) {
+ for (int i = 0; i < ARRAY_SIZE(StationDist); i++) {
+ for (int j = 0; j < ARRAY_SIZE(EngineTrackPosition); j++) {
if (!bTrainArrivalAnnounced[i]) {
float preDist = StationDist[i] - 100.0f;
if (preDist < 0.0f)