diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-06-15 16:44:47 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-06-15 16:44:47 +0200 |
commit | 655eaa36ce4dfbe3c8f7d46097d87d513a384b5f (patch) | |
tree | aa16b934b8623fa16e0dcc149069a5e55115a345 /src/vehicles | |
parent | Fix vehicle cam. zoom values (diff) | |
parent | more cleanup (diff) | |
download | re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.tar re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.tar.gz re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.tar.bz2 re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.tar.lz re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.tar.xz re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.tar.zst re3-655eaa36ce4dfbe3c8f7d46097d87d513a384b5f.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Boat.cpp | 2 | ||||
-rw-r--r-- | src/vehicles/Train.cpp | 4 |
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) |