diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-22 12:43:31 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-22 12:43:31 +0000 |
commit | c5f1f0b1b82b0672768992fd324adce9f379f9a7 (patch) | |
tree | 3dd064888461a611379dd259aabc45a6fb56a8ac /game/terrain.cpp | |
parent | Store a generation number for GeoData (diff) | |
download | ilt-c5f1f0b1b82b0672768992fd324adce9f379f9a7.tar.bz2 ilt-c5f1f0b1b82b0672768992fd324adce9f379f9a7.tar.xz ilt-c5f1f0b1b82b0672768992fd324adce9f379f9a7.zip |
Update terrain meshes as required
Diffstat (limited to 'game/terrain.cpp')
-rw-r--r-- | game/terrain.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 |