mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
trigger bid for ownership on action manipulations
This commit is contained in:
parent
a33c350385
commit
4b29907216
1 changed files with 6 additions and 1 deletions
|
@ -558,6 +558,7 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (actionFactory->factory(simulation, actionType, actionID, entity, arguments)) {
|
if (actionFactory->factory(simulation, actionType, actionID, entity, arguments)) {
|
||||||
|
entity->flagForOwnership();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -571,7 +572,11 @@ QUuid EntityScriptingInterface::addAction(const QString& actionTypeString,
|
||||||
|
|
||||||
bool EntityScriptingInterface::updateAction(const QUuid& entityID, const QUuid& actionID, const QVariantMap& arguments) {
|
bool EntityScriptingInterface::updateAction(const QUuid& entityID, const QUuid& actionID, const QVariantMap& arguments) {
|
||||||
return actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) {
|
return actionWorker(entityID, [&](EntitySimulation* simulation, EntityItemPointer entity) {
|
||||||
return entity->updateAction(simulation, actionID, arguments);
|
bool success = entity->updateAction(simulation, actionID, arguments);
|
||||||
|
if (success) {
|
||||||
|
entity->flagForOwnership();
|
||||||
|
}
|
||||||
|
return success;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue