From 1bdcf8f0cb00b868b271ac5f2abba9e56862ea25 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Wed, 23 Jan 2019 21:26:10 -0800 Subject: [PATCH] MyAvatar bids for ownerhsip on grab --- libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index 17d10cdf49..ffeb6ff545 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -401,6 +401,12 @@ bool Avatar::updateGrabs() { if (success && target) { target->addGrab(grab); + if (isMyAvatar()) { + EntityItemPointer entity = std::dynamic_pointer_cast(target); + if (entity) { + entity->upgradeScriptSimulationPriority(PERSONAL_SIMULATION_PRIORITY); + } + } // only clear this entry from the _changedAvatarGrabs if we found the entity. changeItr.remove(); grabAddedOrRemoved = true;