mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-08 01:10:28 +00:00
(svn r20503) -Fix (r18838): Powered wagons should check the railtype of the tile they are on, not where the engine is on.
This commit is contained in:
parent
b5cf9bc034
commit
fe3c70624e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user