Changeset - r3590:c928685de29a
[Not reviewed]
master
0 1 0
celestar - 19 years ago 2006-04-19 16:10:17
celestar@openttd.org
(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.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
train_cmd.c
Show inline comments
 
@@ -1951,14 +1951,16 @@ static void HandleLocomotiveSmokeCloud(c
 
				GetEngine(engtype)->railtype > RAILTYPE_ELECTRIC ||
 
				v->vehstatus & VS_HIDDEN) {
 
			continue;
 
		}
 

	
 
		// 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.
 
			effect_type = RailVehInfo(engtype)->engclass;
 
		} else {
 
			effect_type--;
0 comments (0 inline, 0 general)