1
0
Fork 0

(svn r20503) -Fix (r18838): Powered wagons should check the railtype of the tile they are on, not where the engine is on.

release/1.1
frosch 2010-08-15 18:35:57 +00:00
parent c52f42ea21
commit 4ca2609362
1 changed files with 2 additions and 1 deletions

View File

@ -395,7 +395,8 @@ protected: // These functions should not be called outside acceleration code.
*/ */
FORCEINLINE uint16 GetPoweredPartPower(const Train *head) const 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; return RailVehInfo(this->tcache.first_engine)->pow_wag_power;
} }