16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 20:29:17 +02:00

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2018-10-10 19:33:08 +02:00
49 changed files with 1697 additions and 1026 deletions

View File

@@ -136,7 +136,7 @@ int TSubModel::Load( cParser &parser, TModel3d *Model, /*int Pos,*/ bool dynamic
iVboPtr = Pos; // pozycja w VBO
*/
if (!parser.expectToken("type:"))
Error("Model type parse failure!");
ErrorLog("Bad model: expected submodel type definition not found while loading model \"" + Model->NameGet() + "\"" );
{
std::string type = parser.getToken<std::string>();
if (type == "mesh")
@@ -1252,8 +1252,10 @@ bool TModel3d::LoadFromFile(std::string const &FileName, bool dynamic)
}
*/
auto const name { FileName };
// cache the file name, in case someone wants it later
m_filename = name;
asBinary = name + ".e3d";
asBinary = name + ".e3d";
if (FileExists(asBinary))
{
LoadFromBinFile(asBinary, dynamic);
@@ -1271,8 +1273,6 @@ bool TModel3d::LoadFromFile(std::string const &FileName, bool dynamic)
}
}
}
// cache the file name, in case someone wants it later
m_filename = name;
bool const result =
Root ? (iSubModelsCount > 0) : false; // brak pliku albo problem z wczytaniem
if (false == result)