Set avatar client sooner

This commit is contained in:
luiscuenca 2018-10-29 07:25:22 -07:00
parent 056fe338e1
commit e49e9cdc56

View file

@ -261,12 +261,13 @@ void AvatarManager::updateOtherAvatars(float deltaTime) {
for (auto it = sortedAvatarVector.begin(); it != sortedAvatarVector.end(); ++it) {
const SortableAvatar& sortData = *it;
const auto avatar = std::static_pointer_cast<OtherAvatar>(sortData.getAvatar());
if (!avatar->_isClientAvatar) {
avatar->setIsClientAvatar(true);
}
// TODO: to help us scale to more avatars it would be nice to not have to poll this stuff every update
if (avatar->getSkeletonModel()->isLoaded()) {
// remove the orb if it is there
avatar->removeOrb();
avatar->setIsClientAvatar(true);
if (avatar->needsPhysicsUpdate()) {
_avatarsToChangeInPhysics.insert(avatar);
}