summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackykid <hackykid@openttd.org>2005-06-05 05:35:12 +0000
committerhackykid <hackykid@openttd.org>2005-06-05 05:35:12 +0000
commit9ac03e71816b2d9227e4705f7ec5166bfdd710eb (patch)
tree642b1cda8ac5f8cdae2efb810f5344d83c77baf7
parentc2e977a0b80e7ca47ec258be467781d30c5c6ec1 (diff)
downloadopenttd-9ac03e71816b2d9227e4705f7ec5166bfdd710eb.tar.xz
(svn r2410) - Fix: [newgrf] When resolving callbacks, dont ignore wagon overrides.
-rw-r--r--engine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/engine.c b/engine.c
index e1a139983..0265f2116 100644
--- a/engine.c
+++ b/engine.c
@@ -606,6 +606,13 @@ uint16 GetCallBackResult(uint16 callback_info, byte engine, const Vehicle *v)
cargo = _global_cargo_id[_opt.landscape][v->cargo_type];
group = &_engine_custom_sprites[engine][cargo];
+
+ if (v != NULL && v->type == VEH_Train) {
+ SpriteGroup *overset = GetWagonOverrideSpriteSet(engine, v->u.rail.first_engine);
+
+ if (overset != NULL) group = overset;
+ }
+
group = ResolveVehicleSpriteGroup(group, v, callback_info, (resolve_callback) ResolveVehicleSpriteGroup);
if (group->type == SGT_REAL && group->g.real.sprites_per_set == 0 && cargo != GC_DEFAULT) {