diff -r 84e2294eac5a -r 72993ac027ea train_cmd.c --- a/train_cmd.c Sat Apr 01 02:02:50 2006 +0000 +++ b/train_cmd.c Sat Apr 01 14:53:11 2006 +0000 @@ -723,7 +723,8 @@ 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);