18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-28 01:07:07 +01:00

fix: the review of the renderers PR: physics switches off by default, crashes on exit and at start, renderer, shader and editor fixes

This commit is contained in:
2026-11-27 09:15:11 +01:00
parent bd597146c3
commit 0ce190eab2
85 changed files with 1519 additions and 418 deletions

View File

@@ -1836,8 +1836,9 @@ void assign_lod_ranges(TSubModel *Root, std::string const &Filename)
}
auto const nearlimit{limits[std::min(phase.index, limitcount - 1)]};
auto farlimit{phase.index + 1 < limitcount ? limits[phase.index + 1] : farthest};
// the last phase starting at 400 m or farther (_LOD5 and on) of a small part would have an empty range: it's seen 100 m on
if (last)
farlimit = vanish;
farlimit = std::max(vanish, nearlimit + 100.f);
phase.submodel->fSquareMinDist = nearlimit * nearlimit;
phase.submodel->fSquareMaxDist = farlimit * farlimit;
}