From 3231c6c3dd319525eb6d3843dd1198773755c7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sat, 13 Jun 2020 17:33:30 +0300 Subject: ProcessTrainAnnouncements fix --- src/vehicles/Train.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index baf6bfb7..26d0dee7 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -639,8 +639,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) -- cgit v1.2.3 From b77d044729c41fb35599525b27357e1b7d7f173a Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 14 Jun 2020 09:50:00 +0200 Subject: fixed boat wake --- src/vehicles/Boat.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vehicles') diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 0ed7876a..d86627de 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -904,6 +904,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; -- cgit v1.2.3