17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-02 08:09:14 +01:00

fix(scenery): binary terrain files named by terrain directives loaded once and only as a complete set, with fallback on the default SBT or the text files; default SBT no longer ignored and rewritten on every load

This commit is contained in:
2026-10-05 23:51:01 +02:00
parent a13a5548df
commit 0ae0aecde8
4 changed files with 102 additions and 9 deletions

View File

@@ -89,6 +89,7 @@ struct global_settings {
int iConvertIndexRange{ 1000 }; // range of duplicate vertex scan
bool file_binary_terrain{ true }; // enable binary terrain (de)serialization
bool file_binary_terrain_state{true};
int file_binary_terrain_skipped{0}; // number of terrain includes left out by the parser during the current scenery load
// logs
bool priorityLoadText3D{false}; // ladowanie T3D priorytetowo
int iWriteLogEnabled{ 3 }; // maska bitowa: 1-zapis do pliku, 2-okienko, 4-nazwy torów

View File

@@ -356,6 +356,7 @@ void cParser::startIncludeFromParser(cParser& srcParser, bool ToLower, std::stri
if (isTerrain && true == Global.file_binary_terrain_state) {
WriteLog("SBT found, ignoring: " + includefile);
readParameters(srcParser); // preserve original side-effect: still consume parameters
++Global.file_binary_terrain_skipped;
if (sceneryLayers)
{
// the file is still a part of the scenery, even though its content comes from the binary terrain file