diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-26 00:16:10 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-26 00:16:10 +0100 |
commit | 50273c040e605b6dbee3389c0c2adce2b8d85701 (patch) | |
tree | 2fc25c2acbad8f03e7cf25f02dc2a3ac70e981ec /src/chunk-render.cpp | |
parent | d4f254dc95a7e103e593f7f7af508de3f9137a10 (diff) |
a
Diffstat (limited to 'src/chunk-render.cpp')
-rw-r--r-- | src/chunk-render.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/chunk-render.cpp b/src/chunk-render.cpp index 9d7787e3..be3d64c4 100644 --- a/src/chunk-render.cpp +++ b/src/chunk-render.cpp @@ -136,13 +136,10 @@ auto chunk::ensure_scenery_mesh(Array<draw_entity>& array) noexcept -> scenery_m const auto size = _entities.size(); - { - ensure_scenery_draw_array(array); - for (auto i = 0uz; const auto& e : _entities) - array[i++] = { e.get(), e->ordinal() }; - std::sort(array.begin(), array.begin() + size, entity_ord_lessp); - //do { Debug{} << "scenery-mesh: sorting" << size; fflush(stdout); } while (false); - } + ensure_scenery_draw_array(array); + for (auto i = 0uz; const auto& e : _entities) + array[i++] = { e.get(), e->ordinal() }; + std::sort(array.begin(), array.begin() + size, entity_ord_lessp); const auto es = ArrayView<draw_entity>{array, size}; @@ -164,7 +161,7 @@ auto chunk::ensure_scenery_mesh(Array<draw_entity>& array) noexcept -> scenery_m for (const auto& [e, ord] : es) { - if (e->atlas->info().fps > 0) + if (e->is_dynamic()) continue; const auto i = scenery_indexes.size(); |