summaryrefslogtreecommitdiff
path: root/depot.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-26 17:31:47 +0000
committertruelight <truelight@openttd.org>2006-08-26 17:31:47 +0000
commit6846e38095f9f47bd80d9f652c705277c8597366 (patch)
tree09d9a6f67e95f26706a0b4e404891623c5c71a12 /depot.c
parentc6f4f954388142a1d5b85993be5574710865ac98 (diff)
downloadopenttd-6846e38095f9f47bd80d9f652c705277c8597366.tar.xz
(svn r6146) -Fix: MSVC doesn't know how to cast to an union.. so fix it via an indirect (and btw the old) way
Diffstat (limited to 'depot.c')
-rw-r--r--depot.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/depot.c b/depot.c
index 0a8e75d54..6f9ca6168 100644
--- a/depot.c
+++ b/depot.c
@@ -79,11 +79,14 @@ Depot *AllocateDepot(void)
*/
void DestroyDepot(Depot *depot)
{
+ DestinationID dest;
+
/* Clear the tile */
DoClearSquare(depot->xy);
/* Clear the depot from all order-lists */
- RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, (DestinationID)depot->index);
+ dest.depot = depot->index;
+ RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, dest);
/* Delete the depot-window */
DeleteWindowById(WC_VEHICLE_DEPOT, depot->xy);