Merge pull request #4411 from AndrewMeadows/thermonuclear

fix for crash when deleting physical entity that departs the domain
This commit is contained in:
Brad Hefta-Gaub 2015-03-10 16:43:17 -07:00
commit 77eae204cf
2 changed files with 3 additions and 2 deletions

View file

@ -99,10 +99,11 @@ void EntitySimulation::sortEntitiesThatMoved() {
_mortalEntities.remove(entity);
_updateableEntities.remove(entity);
removeEntityInternal(entity);
itemItr = _entitiesToBeSorted.erase(itemItr);
} else {
moveOperator.addEntityToMoveList(entity, newCube);
++itemItr;
}
++itemItr;
}
if (moveOperator.hasMovingEntities()) {
PerformanceTimer perfTimer("recurseTreeWithOperator");

View file

@ -616,7 +616,7 @@ void PhysicsEngine::setAvatarData(AvatarData *avatarData) {
glmToBullet(_avatarData->getPosition())));
// XXX these values should be computed from the character model.
btScalar characterRadius = 0.3;
btScalar characterRadius = 0.3f;
btScalar characterHeight = 1.75 - 2.0f * characterRadius;
btScalar stepHeight = btScalar(0.35);