mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r4290) -Fix: fixed power computation for mixed consists on level crossings (michi_cc)
This commit is contained in:
parent
fcedc458f1
commit
07e4134ebd
@ -92,6 +92,9 @@ void TrainPowerChanged(Vehicle* v)
|
||||
if (IsBridgeTile(u->tile) && IsBridgeMiddle(u->tile) && DiagDirToAxis(DirToDiagDir(u->direction)) == GetBridgeAxis(u->tile)) {
|
||||
if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeOnBridge(u->tile))) engine_has_power = false;
|
||||
if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeOnBridge(u->tile))) wagon_has_power = false;
|
||||
} else if (IsLevelCrossing(u->tile)) {
|
||||
if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeCrossing(u->tile))) engine_has_power = false;
|
||||
if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeCrossing(u->tile))) wagon_has_power = false;
|
||||
} else {
|
||||
if (!HasPowerOnRail(u->u.rail.railtype, GetRailType(u->tile))) engine_has_power = false;
|
||||
if (!HasPowerOnRail(v->u.rail.railtype, GetRailType(u->tile))) wagon_has_power = false;
|
||||
|
Loading…
Reference in New Issue
Block a user