From a3a59b5ff2364ad657de1f385c99546c32b2bfb4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 14 Apr 2021 18:28:04 +0300 Subject: [PATCH] Use ObjectInstance instead of AnimatedObject in Scene loader Since ObjectInstance has a matrix now, there's no need to use AnimatedObject here. I may add another statement to include objects with actual animations later. --- source/render/scene.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/render/scene.cpp b/source/render/scene.cpp index dd611536..b8cdc045 100644 --- a/source/render/scene.cpp +++ b/source/render/scene.cpp @@ -1,6 +1,6 @@ #include -#include "animatedobject.h" #include "camera.h" +#include "objectinstance.h" #include "orderedscene.h" #include "renderer.h" #include "scene.h" @@ -120,12 +120,12 @@ void Scene::Loader::object(const string &n) void Scene::Loader::object_tagged(const string &n, const string &t) { - RefPtr anob = new AnimatedObject(get_collection().get(n)); - load_sub(*anob); - obj.add(*anob); + RefPtr inst = new ObjectInstance(get_collection().get(n)); + load_sub(*inst); + obj.add(*inst); if(content && !t.empty()) - (*content)[t] = anob.get(); - obj.owned_data.push_back(anob.release()); + (*content)[t] = inst.get(); + obj.owned_data.push_back(inst.release()); } -- 2.45.2