mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Fix bug with Entities.addEntity returning bad id
If addEntity failed for whatever reason (eg. lack of permission), it would return a non-null UUID. Fixes [FogBugz case #365](https://highfidelity.fogbugz.com/f/cases/356/Entities-addEntity-can-return-a-UUID-even-when-unsuccessful).
This commit is contained in:
parent
2786061d71
commit
a4da63c1ff
1 changed files with 4 additions and 2 deletions
|
@ -191,9 +191,11 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties
|
|||
if (success) {
|
||||
emit debitEnergySource(cost);
|
||||
queueEntityMessage(PacketType::EntityAdd, id, propertiesWithSimID);
|
||||
}
|
||||
|
||||
return id;
|
||||
return id;
|
||||
} else {
|
||||
return QUuid();
|
||||
}
|
||||
}
|
||||
|
||||
QUuid EntityScriptingInterface::addModelEntity(const QString& name, const QString& modelUrl, const glm::vec3& position) {
|
||||
|
|
Loading…
Reference in a new issue