diff --git a/src/files/WorldFiles.cpp b/src/files/WorldFiles.cpp index 3e277464..0d2f96c5 100644 --- a/src/files/WorldFiles.cpp +++ b/src/files/WorldFiles.cpp @@ -145,7 +145,7 @@ static void read_resources_data( if (index == ResourceIndices::MISSING) { logger.warning() << "discard " << name; } else { - indices.saveData(index, map); + indices.saveData(index, map->map("saved")); } } } diff --git a/src/window/Camera.hpp b/src/window/Camera.hpp index d4ce0049..da9221ae 100644 --- a/src/window/Camera.hpp +++ b/src/window/Camera.hpp @@ -4,7 +4,6 @@ #include class Camera { - void updateVectors(); float fov = 1.0f; public: glm::vec3 front {}; @@ -25,6 +24,7 @@ public: } Camera(glm::vec3 position, float fov); + void updateVectors(); void rotate(float x, float y, float z); glm::mat4 getProjection(); diff --git a/src/world/Level.cpp b/src/world/Level.cpp index 9cee7b08..2195a20a 100644 --- a/src/world/Level.cpp +++ b/src/world/Level.cpp @@ -29,7 +29,6 @@ Level::Level( settings(settings) { auto& cameraIndices = content->getIndices(ResourceType::CAMERA); - std::cout << cameraIndices.size() << std::endl; for (size_t i = 0; i < cameraIndices.size(); i++) { auto camera = std::make_shared(); if (auto map = cameraIndices.getSavedData(i)) { @@ -42,6 +41,7 @@ Level::Level( map->num("fov", fov); camera->setFov(fov); } + camera->updateVectors(); cameras.push_back(std::move(camera)); }