mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-02 09:41:10 +02:00
Set avatar client sooner
This commit is contained in:
parent
056fe338e1
commit
e49e9cdc56
1 changed files with 3 additions and 2 deletions
|
@ -261,12 +261,13 @@ void AvatarManager::updateOtherAvatars(float deltaTime) {
|
||||||
for (auto it = sortedAvatarVector.begin(); it != sortedAvatarVector.end(); ++it) {
|
for (auto it = sortedAvatarVector.begin(); it != sortedAvatarVector.end(); ++it) {
|
||||||
const SortableAvatar& sortData = *it;
|
const SortableAvatar& sortData = *it;
|
||||||
const auto avatar = std::static_pointer_cast<OtherAvatar>(sortData.getAvatar());
|
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
|
// 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()) {
|
if (avatar->getSkeletonModel()->isLoaded()) {
|
||||||
// remove the orb if it is there
|
// remove the orb if it is there
|
||||||
avatar->removeOrb();
|
avatar->removeOrb();
|
||||||
avatar->setIsClientAvatar(true);
|
|
||||||
if (avatar->needsPhysicsUpdate()) {
|
if (avatar->needsPhysicsUpdate()) {
|
||||||
_avatarsToChangeInPhysics.insert(avatar);
|
_avatarsToChangeInPhysics.insert(avatar);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue