summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-02-08 19:06:46 +0000
committerpeter1138 <peter1138@openttd.org>2006-02-08 19:06:46 +0000
commitf4215cf6a011d00209834f442df78b721f897993 (patch)
tree2fd8a7cb69edfbcd8ecae362a917fc9ce2c1e1b7 /vehicle.c
parent2265915e6ce2b201fca854a07c0f539e83b5b63d (diff)
downloadopenttd-f4215cf6a011d00209834f442df78b721f897993.tar.xz
(svn r3579) v->u.rail.first_engine holds an engine type, not a vehicle index, so use INVALID_ENGINE.
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 4740ab9ac..ede33bfd6 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1753,7 +1753,7 @@ static void MaybeReplaceVehicle(Vehicle *v)
temp_cost = ReplaceVehicle(&w, flags);
if (flags & DC_EXEC &&
- (w->type != VEH_Train || w->u.rail.first_engine == INVALID_VEHICLE)) {
+ (w->type != VEH_Train || w->u.rail.first_engine == INVALID_ENGINE)) {
/* now we bought a new engine and sold the old one. We need to fix the
* pointers in order to avoid pointing to the old one for trains: these
* pointers should point to the front engine and not the cars