From df6c12b844289af5fe5b01fdc6eb178b57912548 Mon Sep 17 00:00:00 2001 From: Johan Lind Date: Sun, 21 Jan 2024 22:06:49 +0100 Subject: [PATCH] new component creation setup, removed constructors --- engine/jleObject.inl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/jleObject.inl b/engine/jleObject.inl index 05f8888e..bb964e7d 100644 --- a/engine/jleObject.inl +++ b/engine/jleObject.inl @@ -53,7 +53,10 @@ jleObject::addComponent() } } - std::shared_ptr newComponent = std::make_shared(this, _containedInScene); + std::shared_ptr newComponent = std::make_shared(); + newComponent->_attachedToObject = this; + newComponent->_containedInScene = _containedInScene; + _components.push_back(newComponent); addComponentStart(newComponent);