From c5f1f0b1b82b0672768992fd324adce9f379f9a7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 22 Dec 2024 12:43:31 +0000 Subject: Update terrain meshes as required --- game/terrain.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'game/terrain.cpp') diff --git a/game/terrain.cpp b/game/terrain.cpp index bb8e3ce..e7508d0 100644 --- a/game/terrain.cpp +++ b/game/terrain.cpp @@ -66,6 +66,10 @@ Terrain::generateMeshes() void Terrain::tick(TickDuration) { + if (const auto newGeneration = geoData->getGeneration(); newGeneration != geoGeneration) { + generateMeshes(); + geoGeneration = newGeneration; + } } void -- cgit v1.2.3