Merge pull request #15756 from luiscuenca/fixPickOnOtherAvatars

BUGZ-543:Fix avatar picking not working on some avatars
This commit is contained in:
Andrew Meadows 2019-06-13 10:23:16 -07:00 committed by GitHub
commit f9467ccbde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -490,7 +490,7 @@ void AvatarManager::buildPhysicsTransaction(PhysicsEngine::Transaction& transact
_myAvatar->getCharacterController()->buildPhysicsTransaction(transaction);
for (auto avatar : _otherAvatarsToChangeInPhysics) {
bool isInPhysics = avatar->isInPhysicsSimulation();
if (isInPhysics != avatar->shouldBeInPhysicsSimulation()) {
if (isInPhysics != avatar->shouldBeInPhysicsSimulation() || avatar->_needsReinsertion) {
if (isInPhysics) {
transaction.objectsToRemove.push_back(avatar->_motionState);
avatar->_motionState = nullptr;