add final edit when dropping an avatar-entity. don't allow grabbing of other's avatar entities

This commit is contained in:
Seth Alves 2018-12-18 10:43:11 -08:00
parent 05a80ae0e4
commit 54a5805b5c
3 changed files with 12 additions and 5 deletions

View file

@ -2465,6 +2465,14 @@ bool EntityItem::shouldSuppressLocationEdits() const {
i++;
}
i = _grabActions.begin();
while (i != _grabActions.end()) {
if (i.value()->shouldSuppressLocationEdits()) {
return true;
}
i++;
}
// if any of the ancestors are MyAvatar, suppress
return isChildOfMyAvatar();
}

View file

@ -2969,9 +2969,9 @@ void EntityTree::updateEntityQueryAACubeWorker(SpatiallyNestablePointer object,
if (success) {
moveOperator.addEntityToMoveList(entity, newCube);
}
// send an edit packet to update the entity-server about the queryAABox
// unless it is client-only
if (tellServer && packetSender && entity->isDomainEntity()) {
// send an edit packet to update the entity-server about the queryAABox. We do this for domain-hosted
// entities as well as for avatar-entities; the packet-sender will route the update accordingly
if (tellServer && packetSender && (entity->isDomainEntity() || entity->isAvatarEntity())) {
quint64 now = usecTimestampNow();
EntityItemProperties properties = entity->getProperties();
properties.setQueryAACubeDirty();

View file

@ -154,7 +154,6 @@ DISPATCHER_PROPERTIES = [
"grab.equippableIndicatorScale",
"grab.equippableIndicatorOffset",
"userData",
"entityHostType",
"owningAvatarID"
];
@ -291,7 +290,7 @@ getGrabbableData = function (ggdProps) {
};
isAnothersAvatarEntity = function (iaaeProps) {
if (iaaeProps.entityHostType !== "avatar") {
if (!iaaeProps.avatarEntity) {
return false;
}
if (iaaeProps.owningAvatarID === MyAvatar.sessionUUID) {