summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-13 16:33:30 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-13 16:33:30 +0200
commit3231c6c3dd319525eb6d3843dd1198773755c7e1 (patch)
treeb90555c68fdea72a8bec98d520156b231b057fec /src/vehicles
parentsmall fixes (diff)
downloadre3-3231c6c3dd319525eb6d3843dd1198773755c7e1.tar
re3-3231c6c3dd319525eb6d3843dd1198773755c7e1.tar.gz
re3-3231c6c3dd319525eb6d3843dd1198773755c7e1.tar.bz2
re3-3231c6c3dd319525eb6d3843dd1198773755c7e1.tar.lz
re3-3231c6c3dd319525eb6d3843dd1198773755c7e1.tar.xz
re3-3231c6c3dd319525eb6d3843dd1198773755c7e1.tar.zst
re3-3231c6c3dd319525eb6d3843dd1198773755c7e1.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Train.cpp4
1 files changed, 2 insertions, 2 deletions
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)