mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 06:14:58 +01:00
fix(editor): Fields: a separate field is built after loading with the camera still; a cleared outline or another field chosen forgets the one to outline again; giving back a field keeps the holes of the others over it
- waits_for_ground counts a chunk as still coming while its pack isn't read yet (right after opening the scenery none is), and as not coming only when the pack is missing or read without that chunk. Before, the first build after opening left a saved separate field a hole until the camera moved. - Clear the outline (Fields and the area fill) and choosing another field in the list forget the field put back by Outline it again, so the next cut is a new field and not the old one moved. - All holes of separate fields share one mark, so closing one closed it under an overlapping field too; the separate fields left over the closed outline are cut again after it (when a field is given back or outlined again). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
This commit is contained in:
@@ -921,7 +921,14 @@ bool terrain_streamer::waits_for_ground(heightmap::surface_patch const &Patch) c
|
||||
for (auto x{std::min(first.first, last.first)}; x <= std::max(first.first, last.first); ++x)
|
||||
{
|
||||
chunk_key const key{x, z};
|
||||
if (m_chunks.find(key) == m_chunks.end() && exists(key))
|
||||
if (m_chunks.count(key) > 0 || m_removed.count(key) > 0)
|
||||
continue;
|
||||
// still coming while its pack isn't read yet (just after opening the scenery none is); not coming only when
|
||||
// the pack is missing, or read and without that chunk
|
||||
auto const pack{m_packs.find(heightmap::pack_of(key))};
|
||||
if (pack == m_packs.end() || pack->second.status == pack_state::state::unknown || pack->second.status == pack_state::state::loading)
|
||||
return true;
|
||||
if (pack->second.status == pack_state::state::ready && pack->second.file->has(key))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user