summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Train.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles/Train.cpp')
-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 f3a669d6..1c73ed05 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -261,9 +261,9 @@ CTrain::ProcessControl(void)
if(xmin < 0) xmin = 0;
xmax = CWorld::GetSectorIndexX(front.x + 3.0f);
if(xmax > NUMSECTORS_X-1) xmax = NUMSECTORS_X-1;
- ymin = CWorld::GetSectorIndexX(front.y - 3.0f);
+ ymin = CWorld::GetSectorIndexY(front.y - 3.0f);
if(ymin < 0) ymin = 0;
- ymax = CWorld::GetSectorIndexX(front.y + 3.0f);
+ ymax = CWorld::GetSectorIndexY(front.y + 3.0f);
if(ymax > NUMSECTORS_Y-1) ymax = NUMSECTORS_X-1;
CWorld::AdvanceCurrentScanCode();