fix deadlock in enter/leave events

This commit is contained in:
ZappoMan 2014-12-08 15:06:34 -08:00
parent efbe8ce757
commit cdeaaf2ca9

View file

@ -233,7 +233,7 @@ void EntityTreeRenderer::update() {
void EntityTreeRenderer::checkEnterLeaveEntities() {
if (_tree) {
_tree->lockForRead();
_tree->lockForWrite(); // so that our scripts can do edits if they want
glm::vec3 avatarPosition = Application::getInstance()->getAvatar()->getPosition() / (float) TREE_SCALE;
if (avatarPosition != _lastAvatarPosition) {