Change ship path cache to be optional and use a ring buffer

This commit is contained in:
Jonathan G Rennison
2023-08-16 15:20:24 +01:00
parent 2ae4e5bdc1
commit 92e632454e
7 changed files with 92 additions and 20 deletions

View File

@@ -1709,7 +1709,7 @@ static void MaxVehiclesChanged(int32 new_value)
static void InvalidateShipPathCache(int32 new_value)
{
for (Ship *s : Ship::Iterate()) {
s->path.clear();
s->cached_path.reset();
}
}