Changeset - r15814:8b3ad56fa493
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-08-15 18:35:57
frosch@openttd.org
(svn r20503) -Fix (r18838): Powered wagons should check the railtype of the tile they are on, not where the engine is on.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/train.h
Show inline comments
 
@@ -395,7 +395,8 @@ protected: // These functions should not
 
	 */
 
	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;
 
		}
 

	
0 comments (0 inline, 0 general)