diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-10-15 11:57:59 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-10-15 11:57:59 +0200 |
commit | 62aefda51d1db9968b0a231220f0afa436f132ae (patch) | |
tree | 605f2bcb1d622181afceec681e4cdd32a5ffd2e6 /src/common/Collision/Models/GameObjectModel.cpp | |
parent | d08e299974142e1354810d66ff09f5aa134a27f6 (diff) |
Core/GameObjects: Don't ignore collision for destructible gameobjects in destroyed state - they simply have a different model
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.cpp')
-rw-r--r-- | src/common/Collision/Models/GameObjectModel.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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<GameObjectModelOwnerBase> model return true; } -GameObjectModel* GameObjectModel::Create(std::unique_ptr<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath) +std::unique_ptr<GameObjectModel> GameObjectModel::Create(std::unique_ptr<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath) { - GameObjectModel* mdl = new GameObjectModel(); + std::unique_ptr<GameObjectModel> mdl(new GameObjectModel()); if (!mdl->initialize(std::move(modelOwner), dataPath)) - { - delete mdl; return nullptr; - } return mdl; } |