diff options
-rw-r--r-- | src/train.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/train.h b/src/train.h index 6cb7e5888..40c340328 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; } |