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/Train.cpp') 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