mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 16:14:01 +02:00
Merge pull request #13534 from huffman/fix/ess-avatar-entities
Fix crash when editing avatar entities with no myAvatar
This commit is contained in:
commit
21d043d179
1 changed files with 9 additions and 3 deletions
|
@ -84,9 +84,15 @@ void EntityEditPacketSender::queueEditEntityMessage(PacketType type,
|
|||
EntityTreePointer entityTree,
|
||||
EntityItemID entityItemID,
|
||||
const EntityItemProperties& properties) {
|
||||
if (properties.getClientOnly() && properties.getOwningAvatarID() == _myAvatar->getID()) {
|
||||
// this is an avatar-based entity --> update our avatar-data rather than sending to the entity-server
|
||||
queueEditAvatarEntityMessage(type, entityTree, entityItemID, properties);
|
||||
if (properties.getClientOnly()) {
|
||||
if (!_myAvatar) {
|
||||
qCWarning(entities) << "Suppressing entity edit message: cannot send clientOnly edit with no myAvatar";
|
||||
} else if (properties.getOwningAvatarID() == _myAvatar->getID()) {
|
||||
// this is an avatar-based entity --> update our avatar-data rather than sending to the entity-server
|
||||
queueEditAvatarEntityMessage(type, entityTree, entityItemID, properties);
|
||||
} else {
|
||||
qCWarning(entities) << "Suppressing entity edit message: cannot send clientOnly edit for another avatar";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue