summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-01 06:38:36 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-01 06:38:36 +0000
commit726e44aa153b65b9f72482dc71e69a6c8db31a6a (patch)
tree35e54c0b2fb315574cb45dad208f2540d69c5a59
parent838ea453dc8eb6f06f10310c72a35344c7458314 (diff)
downloadopenttd-726e44aa153b65b9f72482dc71e69a6c8db31a6a.tar.xz
(svn r4636) - NewGRF: when dealing with vehicle types other than trains, set the parent scope vehicle to be the same as self scope. (Thanks mart3p)
-rw-r--r--newgrf_engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newgrf_engine.c b/newgrf_engine.c
index 38f3af57a..739d985ab 100644
--- a/newgrf_engine.c
+++ b/newgrf_engine.c
@@ -416,7 +416,7 @@ static inline void NewVehicleResolver(ResolverObject *res, const Vehicle *v)
res->ResolveReal = &VehicleResolveReal;
res->vehicle.self = v;
- res->vehicle.parent = (v != NULL && v->type == VEH_Train) ? GetFirstVehicleInChain(v) : NULL;
+ res->vehicle.parent = (v != NULL && v->type == VEH_Train) ? GetFirstVehicleInChain(v) : v;
res->callback = 0;
res->callback_param1 = 0;