Changeset - r3411:f13f79abbcbd
[Not reviewed]
master
0 1 0
bjarni - 19 years ago 2006-04-01 14:53:11
bjarni@openttd.org
(svn r4226) -Fix: [elrails] it's no longer possible to build electric engines in non-electric depots
this prevents autoreplace to replace to electric engines before the line in question got catenary
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
train_cmd.c
Show inline comments
 
@@ -723,7 +723,8 @@ int32 CmdBuildRailVehicle(int x, int y, 
 
	e = GetEngine(p1);
 

	
 
	/* Check if depot and new engine uses the same kind of tracks */
 
	if (!IsCompatibleRail(e->railtype, GetRailType(tile))) return CMD_ERROR;
 
	/* We need to see if the engine got power on the tile to avoid eletric engines in non-electric depots */
 
	if (!HasPowerOnRail(e->railtype, GetRailType(tile))) return CMD_ERROR;
 

	
 
	if (rvi->flags & RVI_WAGON) return CmdBuildRailWagon(p1, tile, flags);
 

	
0 comments (0 inline, 0 general)