summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-01-14 23:33:42 +0000
committerPeterN <peter@fuzzle.org>2019-01-19 23:11:17 +0000
commit81330b8d6edee68c38717462737fbfca6420701d (patch)
treeed4e0e34930a5e6f28b5d275c27f6ccb50a2ba63 /src/station_cmd.cpp
parent1c725fce47d60907bbf2224c7bdc28607fcf6017 (diff)
downloadopenttd-81330b8d6edee68c38717462737fbfca6420701d.tar.xz
Change: Add path cache for ships.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 66a09c435..f088ccf6e 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1980,7 +1980,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags)
FOR_ALL_ROADVEHICLES(v) {
if (v->First() == v && v->current_order.IsType(OT_GOTO_STATION) &&
v->dest_tile == tile) {
- v->dest_tile = v->GetOrderStationLocation(st->index);
+ v->SetDestTile(v->GetOrderStationLocation(st->index));
}
}
@@ -2604,7 +2604,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags)
}
if (s->dest_tile == docking_location) {
- s->dest_tile = 0;
+ s->SetDestTile(0);
s->current_order.Free();
}
}