mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 21:56:26 +02:00
Fix MyAvatar getting stuck in T-pose on loading
Before this change, there was a race condition between the main thread calling Model::initWhenReady, and the render thread calling Avatar::fixupModelsInScene(). They both would end up setting the Model::_addedToScene flag. This race caused Model::initWhenReady() to never return true, which resulted in the MyAvatar class never initializing the animation system.
This commit is contained in:
parent
db0ecb61fd
commit
559ac6786d
1 changed files with 3 additions and 1 deletions
|
@ -648,7 +648,9 @@ void Avatar::render(RenderArgs* renderArgs) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixupModelsInScene(renderArgs->_scene);
|
if (!isMyAvatar()) {
|
||||||
|
fixupModelsInScene(renderArgs->_scene);
|
||||||
|
}
|
||||||
|
|
||||||
if (showCollisionShapes && shouldRenderHead(renderArgs) && _skeletonModel->isRenderable()) {
|
if (showCollisionShapes && shouldRenderHead(renderArgs) && _skeletonModel->isRenderable()) {
|
||||||
PROFILE_RANGE_BATCH(batch, __FUNCTION__":skeletonBoundingCollisionShapes");
|
PROFILE_RANGE_BATCH(batch, __FUNCTION__":skeletonBoundingCollisionShapes");
|
||||||
|
|
Loading…
Reference in a new issue