Chunnel: Use hash table for tunnel search, change tunnel fields and savegame format.
This commit is contained in:
@@ -2046,7 +2046,7 @@ bool AfterLoadGame()
|
||||
return false;
|
||||
}
|
||||
|
||||
const Tunnel *t = new Tunnel(start_tile, end_tile, false);
|
||||
const Tunnel *t = new Tunnel(start_tile, end_tile, TileHeight(start_tile), false);
|
||||
|
||||
SetTunnelIndex(start_tile, t->index);
|
||||
SetTunnelIndex(end_tile, t->index);
|
||||
@@ -2055,7 +2055,6 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Move the signal variant back up one bit for PBS. We don't convert the old PBS
|
||||
* format here, as an old layout wouldn't work properly anyway. To be safe, we
|
||||
* clear any possible PBS reservations as well. */
|
||||
|
@@ -20,6 +20,7 @@
|
||||
static const SaveLoad _tunnel_desc[] = {
|
||||
SLE_CONDVAR(Tunnel, tile_n, SLE_UINT32, 0, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Tunnel, tile_s, SLE_UINT32, 0, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Tunnel, height, SLE_UINT8, 0, SL_MAX_VERSION),
|
||||
SLE_CONDVAR(Tunnel, is_chunnel, SLE_BOOL, 0, SL_MAX_VERSION),
|
||||
SLE_END()
|
||||
};
|
||||
|
Reference in New Issue
Block a user