summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--train_cmd.c6
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.