Chunnel: Use hash table for tunnel search, change tunnel fields and savegame format.

This commit is contained in:
Jonathan G Rennison
2017-03-05 14:32:17 +00:00
parent ad15b47f72
commit 89a0a9c182
5 changed files with 54 additions and 27 deletions

View File

@@ -814,7 +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(STR_ERROR_TUNNEL_TOO_MANY);
const Tunnel *t = new Tunnel(tn, ts, is_chunnel);
const Tunnel *t = new Tunnel(tn, ts, TileHeight(tn), is_chunnel);
if (transport_type == TRANSPORT_RAIL) {
if (!IsTunnelTile(start_tile) && c != NULL) c->infrastructure.rail[railtype] += num_pieces;