early break if single object sleeping

This commit is contained in:
CuriousRubick 2018-01-26 10:31:00 -06:00 committed by GitHub
parent c41d575907
commit ecfdd07f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,13 +314,11 @@ void btSimulationIslandManagerMt::buildIslands( btDispatcher* dispatcher, btColl
btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1));
if (colObj0->getIslandTag() == islandId)
{
if (colObj0->getActivationState()== ACTIVE_TAG)
{
allSleeping = false;
}
if (colObj0->getActivationState()== DISABLE_DEACTIVATION)
if (colObj0->getActivationState()== ACTIVE_TAG ||
colObj0->getActivationState()== DISABLE_DEACTIVATION)
{
allSleeping = false;
break;
}
}
}