summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-06-06 10:51:11 +0000
committerpeter1138 <peter1138@openttd.org>2007-06-06 10:51:11 +0000
commit07c34b2628b821e03fa3b996508897a763469107 (patch)
treefae1bf6434d339fe3be07b36d0fc1c3f8dec82e4
parent4ffe147bd4cae3efdaad256c223ceaeab451deca (diff)
downloadopenttd-07c34b2628b821e03fa3b996508897a763469107.tar.xz
(svn r10048) -Fix (r6455): Don't use override engine type for articulated wagon parts.
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index d6c46e5e5..daae5c0c9 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2595,7 +2595,7 @@ SpriteID GetVehiclePalette(const Vehicle *v)
{
if (v->type == VEH_TRAIN) {
return GetEngineColourMap(
- (v->u.rail.first_engine != INVALID_ENGINE && (IsArticulatedPart(v) || UsesWagonOverride(v))) ?
+ (v->u.rail.first_engine != INVALID_ENGINE && (UsesWagonOverride(v) || (IsArticulatedPart(v) && RailVehInfo(v->engine_type)->railveh_type != RAILVEH_WAGON))) ?
v->u.rail.first_engine : v->engine_type,
v->owner, v->u.rail.first_engine, v);
}