Replace vehicle tile hash

Use robin hood hash of TileIndex
Retain linked list of vehicles on the same tile
This commit is contained in:
Jonathan G Rennison
2023-09-10 15:02:31 +01:00
parent b09894db4f
commit f6eadf19c6
3 changed files with 85 additions and 55 deletions

View File

@@ -307,8 +307,8 @@ public:
Vehicle **hash_viewport_prev; ///< NOSAVE: Previous vehicle in the visual location hash.
Vehicle *hash_tile_next; ///< NOSAVE: Next vehicle in the tile location hash.
Vehicle **hash_tile_prev; ///< NOSAVE: Previous vehicle in the tile location hash.
Vehicle **hash_tile_current; ///< NOSAVE: Cache of the current hash chain.
Vehicle *hash_tile_prev; ///< NOSAVE: Previous vehicle in the tile location hash.
TileIndex hash_tile_current = INVALID_TILE; ///< NOSAVE: current tile used for tile location hash.
byte breakdown_severity; ///< severity of the breakdown. Note that lower means more severe
byte breakdown_type; ///< Type of breakdown