mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
fix deadlock in enter/leave events
This commit is contained in:
parent
efbe8ce757
commit
cdeaaf2ca9
1 changed files with 1 additions and 1 deletions
|
@ -233,7 +233,7 @@ void EntityTreeRenderer::update() {
|
||||||
|
|
||||||
void EntityTreeRenderer::checkEnterLeaveEntities() {
|
void EntityTreeRenderer::checkEnterLeaveEntities() {
|
||||||
if (_tree) {
|
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;
|
glm::vec3 avatarPosition = Application::getInstance()->getAvatar()->getPosition() / (float) TREE_SCALE;
|
||||||
|
|
||||||
if (avatarPosition != _lastAvatarPosition) {
|
if (avatarPosition != _lastAvatarPosition) {
|
||||||
|
|
Loading…
Reference in a new issue