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
commit984a7f808ba2720fd7b030ebc2c3722d7562292c (patch)
tree35e54c0b2fb315574cb45dad208f2540d69c5a59
parentddbb61199b4695089d8c2eedbe84b0428386c42e (diff)
downloadopenttd-984a7f808ba2720fd7b030ebc2c3722d7562292c.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;