Update Zone.cpp

This commit is contained in:
David Markowitz 2023-11-21 17:49:55 -08:00
parent 1ea65b3549
commit 3f9d1a18f0

View File

@ -241,33 +241,15 @@ void Zone::LoadScene(std::istream& file) {
m_Scenes.insert(std::make_pair(lwoSceneID, scene));
}
<<<<<<< Updated upstream
void Zone::LoadLUTriggers(std::string triggerFile, SceneRef& scene) {
auto buffer = Game::assetManager->GetFileAsBuffer((m_ZonePath + triggerFile).c_str());
=======
std::vector<LUTriggers::Trigger*> Zone::LoadLUTriggers(std::string triggerFile, LWOSCENEID sceneID) {
std::vector<LUTriggers::Trigger*> lvlTriggers;
auto file = Game::assetManager->GetFile((m_ZonePath + triggerFile).c_str());
>>>>>>> Stashed changes
if (!file) {
LOG("Failed to load %s from disk. Skipping loading triggers", (m_ZonePath + triggerFile).c_str());
return;
}
std::stringstream data;
data << file.rdbuf();
<<<<<<< Updated upstream
buffer.close();
data.seekg(0, std::ios::end);
int32_t size = data.tellg();
data.seekg(0, std::ios::beg);
=======
if (data.str().size() == 0) return lvlTriggers;
>>>>>>> Stashed changes
if (size == 0) return;