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

@@ -24,12 +24,13 @@ struct Tunnel : TunnelPool::PoolItem<&_tunnel_pool> {
TileIndex tile_n; // North tile of tunnel.
TileIndex tile_s; // South tile of tunnel.
bool is_chunnel;
uint8 height; // Tunnel height
bool is_chunnel; // Whether this tunnel is a chunnel
Tunnel() {}
~Tunnel();
Tunnel(TileIndex tile_n, TileIndex tile_s, bool is_chunnel) : tile_n(tile_n), tile_s(tile_s), is_chunnel(is_chunnel)
Tunnel(TileIndex tile_n, TileIndex tile_s, uint8 height, bool is_chunnel) : tile_n(tile_n), tile_s(tile_s), height(height), is_chunnel(is_chunnel)
{
this->UpdateIndexes();
}