mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:56:52 +02:00
trying again on avatar-entity grab releases
This commit is contained in:
parent
54a5805b5c
commit
3c0243419b
1 changed files with 8 additions and 0 deletions
|
@ -525,6 +525,14 @@ void Avatar::updateGrabs() {
|
||||||
// only clear this entry from the _deletedAvatarGrabs if we found the entity.
|
// only clear this entry from the _deletedAvatarGrabs if we found the entity.
|
||||||
if (success && target) {
|
if (success && target) {
|
||||||
bool iShouldTellServer = target->getEditSenderID() == sessionID;
|
bool iShouldTellServer = target->getEditSenderID() == sessionID;
|
||||||
|
|
||||||
|
EntityItemPointer entity = std::dynamic_pointer_cast<EntityItem>(target);
|
||||||
|
if (entity && entity->isAvatarEntity() && (entity->getOwningAvatarID() == sessionID ||
|
||||||
|
entity->getOwningAvatarID() == AVATAR_SELF_ID)) {
|
||||||
|
// this is our own avatar-entity, so we always tell the server about the release
|
||||||
|
iShouldTellServer = true;
|
||||||
|
}
|
||||||
|
|
||||||
target->removeGrab(grab);
|
target->removeGrab(grab);
|
||||||
delItr.remove();
|
delItr.remove();
|
||||||
// in case this is the last grab on an entity, we need to shrink the queryAACube and tell the server
|
// in case this is the last grab on an entity, we need to shrink the queryAACube and tell the server
|
||||||
|
|
Loading…
Reference in a new issue