Chunnel: Adjust struct Tunnel constructor

This commit is contained in:
Jonathan G Rennison
2017-03-04 12:36:01 +00:00
parent ee0d6e2fe6
commit aac5b2d4ad
3 changed files with 4 additions and 7 deletions

View File

@@ -814,9 +814,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
if(start_tile > end_tile) Swap(tn, ts);
if (!Tunnel::CanAllocateItem()) return CMD_ERROR;
Tunnel *t = new Tunnel(tn);
t->tile_s = ts;
t->is_chunnel = is_chunnel;
const Tunnel *t = new Tunnel(tn, ts, is_chunnel);
if (transport_type == TRANSPORT_RAIL) {
if (!IsTunnelTile(start_tile) && c != NULL) c->infrastructure.rail[railtype] += num_pieces;