# HG changeset patch # User celestar # Date 2006-04-19 16:10:17 # Node ID c928685de29a12f41f32e6881627e97ea940fca6 # Parent 059e0e7620282da63b0aebeb8d0e883533a4a35f (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. diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -1954,8 +1954,10 @@ static void HandleLocomotiveSmokeCloud(c } // 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.