Add check for file replace

This commit is contained in:
Christian Semmler 2025-08-13 15:57:02 -07:00
parent fc6d065732
commit 9f7408b4c7
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -46,7 +46,11 @@ void CreateWidescreen()
object->location_ = si::Vector3(-240.0, 0.0, -1.0);
object->direction_ = si::Vector3(0, 0, 0);
object->up_ = si::Vector3(0, 1.0, 0);
object->ReplaceWithFile(file.c_str());
if (!object->ReplaceWithFile(file.c_str())) {
abort();
}
si.AppendChild(object);
depfile << result << ": " << (std::filesystem::current_path() / file).string() << std::endl;
i++;
@ -176,7 +180,10 @@ void CreateHDMusic()
object->direction_ = si::Vector3(0, 0, 1);
object->up_ = si::Vector3(0, 1, 0);
object->volume_ = 79;
object->ReplaceWithFile(file.c_str());
if (!object->ReplaceWithFile(file.c_str())) {
abort();
}
si.AppendChild(object);
depfile << result << ": " << (std::filesystem::current_path() / file).string() << std::endl;