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

@@ -205,7 +205,7 @@ class NIHVehicle : public NIHelper {
b += seprintf(b, lastof(buffer), " [-] Flags:\n");
b = v->DumpVehicleFlagsMultiline(b, lastof(buffer), " ", " ");
ProcessLineByLine(buffer, output.print);
seprintf(buffer, lastof(buffer), " Tile hash: %s", (v->hash_tile_current != nullptr) ? "yes" : "no");
seprintf(buffer, lastof(buffer), " Tile hash: %s", (v->hash_tile_current != INVALID_TILE) ? "yes" : "no");
output.print(buffer);
} else {
b += seprintf(b, lastof(buffer), " [+] Flags: ");