mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +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,
|
EntityTreePointer entityTree,
|
||||||
EntityItemID entityItemID,
|
EntityItemID entityItemID,
|
||||||
const EntityItemProperties& properties) {
|
const EntityItemProperties& properties) {
|
||||||
if (properties.getClientOnly() && properties.getOwningAvatarID() == _myAvatar->getID()) {
|
if (properties.getClientOnly()) {
|
||||||
// this is an avatar-based entity --> update our avatar-data rather than sending to the entity-server
|
if (!_myAvatar) {
|
||||||
queueEditAvatarEntityMessage(type, entityTree, entityItemID, properties);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue