summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-07 11:41:44 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-07 11:41:44 +0000
commit7e0ca9489d53776642ee389fe9ec461d2d19a6b7 (patch)
tree6561cf240f19694d6591cbd8854b7eb6ac3eb23c
parent99cb906265d3e1a54c81db1fdcad2ca264cbd6a8 (diff)
downloadopenttd-7e0ca9489d53776642ee389fe9ec461d2d19a6b7.tar.xz
(svn r4769) - Newstations: add newstations ttdpatch flag
-rw-r--r--newgrf.c1
-rw-r--r--rail_cmd.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/newgrf.c b/newgrf.c
index db99677fe..5f879063f 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -2476,6 +2476,7 @@ static void InitializeGRFSpecial(void)
| (1 << 0x1C); /* electrifiedrailway */
_ttdpatch_flags[2] = (_patches.build_on_slopes ? (1 << 0x0D) : 0) /* buildonslopes */
+ | (1 << 0x12) /* newstations */
| (_patches.build_on_slopes ? (1 << 0x15) : 0) /* buildoncoasts */
| (1 << 0x16) /* canals */
| (1 << 0x17) /* newstartyear */
diff --git a/rail_cmd.c b/rail_cmd.c
index c85019ff6..b4ed546e6 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -852,7 +852,7 @@ static int32 DoConvertRail(TileIndex tile, RailType totype, bool exec)
{
if (!CheckTileOwnership(tile)) return CMD_ERROR;
- if (!EnsureNoVehicle(tile) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;
+ if (!(EnsureNoVehicle(tile) || (GetRailType(tile) == RAILTYPE_RAIL && totype == RAILTYPE_ELECTRIC)) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;
// tile is already of requested type?
if (GetRailType(tile) == totype) return CMD_ERROR;