From 62aefda51d1db9968b0a231220f0afa436f132ae Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 15 Oct 2025 11:57:59 +0200 Subject: Core/GameObjects: Don't ignore collision for destructible gameobjects in destroyed state - they simply have a different model --- src/common/Collision/Models/GameObjectModel.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/common/Collision/Models/GameObjectModel.cpp') diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp index 7e8d0b9d438..5d8712561f6 100644 --- a/src/common/Collision/Models/GameObjectModel.cpp +++ b/src/common/Collision/Models/GameObjectModel.cpp @@ -140,14 +140,11 @@ bool GameObjectModel::initialize(std::unique_ptr model return true; } -GameObjectModel* GameObjectModel::Create(std::unique_ptr modelOwner, std::string const& dataPath) +std::unique_ptr GameObjectModel::Create(std::unique_ptr modelOwner, std::string const& dataPath) { - GameObjectModel* mdl = new GameObjectModel(); + std::unique_ptr mdl(new GameObjectModel()); if (!mdl->initialize(std::move(modelOwner), dataPath)) - { - delete mdl; return nullptr; - } return mdl; } -- cgit v1.2.3