Resetting a track now properly accounts for scripting

This commit is contained in:
Sachith Hasaranga Seneviratne 2014-09-10 19:09:31 +05:30
parent b6a9e5be9c
commit 71ad22b2d8

View File

@ -84,6 +84,16 @@ void TrackObjectManager::reset()
for_in (curr, m_all_objects)
{
curr->reset();
if (!curr->isEnabled())
{
//PhysicalObjects may need to be added
if (curr->getType() == "mesh")
{
if (curr->getPhysicalObject() != NULL)
curr->getPhysicalObject()->addBody();
}
}
curr->setEnable(true);
}
} // reset