Skip to content

Commit

Permalink
Remove MCObject from world in ~MCObject()
Browse files Browse the repository at this point in the history
  • Loading branch information
juzzlin committed Feb 22, 2021
1 parent f4932a4 commit ae380b8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/game/MiniCore/src/Core/mcobject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,6 @@ class MCObject::Impl
return *m_parent;
}

~Impl()
{
removeFromWorldNow();
deleteContacts();
}

private:
float calculateLinearBalance(const MCVector3dF & force, const MCVector3dF & pos)
{
Expand Down Expand Up @@ -1091,4 +1085,8 @@ MCPhysicsComponent & MCObject::physicsComponent()
return m_impl->physicsComponent();
}

MCObject::~MCObject() = default;
MCObject::~MCObject()
{
removeFromWorldNow();
deleteContacts();
}

0 comments on commit ae380b8

Please sign in to comment.