diff options
author | celestar <celestar@openttd.org> | 2006-04-19 16:10:17 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-19 16:10:17 +0000 |
commit | ccdf3227990ba90ace9dd725becb3761ee66f6c9 (patch) | |
tree | 068277d09620ba6ae63f41ae52f72073045f1c5f /train_cmd.c | |
parent | 1b1e519b76770701f3b9102a0df111581135dddd (diff) | |
download | openttd-ccdf3227990ba90ace9dd725becb3761ee66f6c9.tar.xz |
(svn r4479) -Fix (FS#90) electric engines (or rather their pantographs) no longer emit sparks when engine is pulled on convrail (MeusH)
P.S. Credit for previous commit goes to the bug reporter, nycom, who submitted the fix as well.
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c index c85fe7ee0..d3c1140af 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1954,8 +1954,10 @@ static void HandleLocomotiveSmokeCloud(const Vehicle* v) } // No smoke in depots or tunnels - if (IsTileDepotType(v->tile, TRANSPORT_RAIL) || IsTunnelTile(v->tile)) - continue; + if (IsTileDepotType(v->tile, TRANSPORT_RAIL) || IsTunnelTile(v->tile)) continue; + + // No sparks for electric vehicles on nonelectrified tracks + if (!HasPowerOnRail(v->u.rail.railtype, GetTileRailType(v->tile, GetVehicleTrackdir(v)))) continue; if (effect_type == 0) { // Use default effect type for engine class. |