avoid unecessary branch

This commit is contained in:
Andrew Meadows 2016-09-16 14:50:08 -07:00
parent 61a05eb4d1
commit 49224d9698

View file

@ -204,13 +204,9 @@ bool CharacterGhostObject::sweepTest(
CharacterSweepResult& result) const {
if (_world && _inWorld) {
assert(shape);
btScalar allowedPenetration = _world->getDispatchInfo().m_allowedCcdPenetration;
convexSweepTest(shape, start, end, result, allowedPenetration);
if (result.hasHit()) {
return true;
}
return result.hasHit();
}
return false;
}