mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
add final edit when dropping an avatar-entity. don't allow grabbing of other's avatar entities
This commit is contained in:
parent
05a80ae0e4
commit
54a5805b5c
3 changed files with 12 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue