mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 00:02:39 +02:00
CR feedback
This commit is contained in:
parent
d53b528994
commit
55138ed088
2 changed files with 701 additions and 703 deletions
File diff suppressed because it is too large
Load diff
|
@ -1871,21 +1871,19 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
|||
}
|
||||
}
|
||||
|
||||
if (!properties.getPrivateUserData().isEmpty() && validEditPacket) {
|
||||
if (!senderNode->getCanGetAndSetPrivateUserData()) {
|
||||
if (wantEditLogging()) {
|
||||
qCDebug(entities) << "User [" << senderNode->getUUID()
|
||||
<< "] is attempting to set private user data but user isn't allowed; edit rejected...";
|
||||
}
|
||||
if (!properties.getPrivateUserData().isEmpty() && validEditPacket && !senderNode->getCanGetAndSetPrivateUserData()) {
|
||||
if (wantEditLogging()) {
|
||||
qCDebug(entities) << "User [" << senderNode->getUUID()
|
||||
<< "] is attempting to set private user data but user isn't allowed; edit rejected...";
|
||||
}
|
||||
|
||||
// If this was an add, we also want to tell the client that sent this edit that the entity was not added.
|
||||
if (isAdd) {
|
||||
QWriteLocker locker(&_recentlyDeletedEntitiesLock);
|
||||
_recentlyDeletedEntityItemIDs.insert(usecTimestampNow(), entityItemID);
|
||||
validEditPacket = false;
|
||||
} else {
|
||||
suppressDisallowedPrivateUserData = true;
|
||||
}
|
||||
// If this was an add, we also want to tell the client that sent this edit that the entity was not added.
|
||||
if (isAdd) {
|
||||
QWriteLocker locker(&_recentlyDeletedEntitiesLock);
|
||||
_recentlyDeletedEntityItemIDs.insert(usecTimestampNow(), entityItemID);
|
||||
validEditPacket = false;
|
||||
} else {
|
||||
suppressDisallowedPrivateUserData = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue