From 4ca2609362572ec218a7e9e05b9f9bdb76900b6e Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 15 Aug 2010 18:35:57 +0000 Subject: [PATCH] (svn r20503) -Fix (r18838): Powered wagons should check the railtype of the tile they are on, not where the engine is on. --- src/train.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/train.h b/src/train.h index 6cb7e5888b..40c3403284 100644 --- a/src/train.h +++ b/src/train.h @@ -395,7 +395,8 @@ protected: // These functions should not be called outside acceleration code. */ FORCEINLINE uint16 GetPoweredPartPower(const Train *head) const { - if (HasBit(this->flags, VRF_POWEREDWAGON) && HasPowerOnRail(head->railtype, GetRailType(head->tile))) { + /* For powered wagons the engine defines the type of engine (i.e. railtype) */ + if (HasBit(this->flags, VRF_POWEREDWAGON) && HasPowerOnRail(head->railtype, GetRailType(this->tile))) { return RailVehInfo(this->tcache.first_engine)->pow_wag_power; }