mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
code review
This commit is contained in:
parent
a737b4024d
commit
993111d22f
2 changed files with 5 additions and 4 deletions
|
@ -65,9 +65,9 @@ EntityActionPointer InterfaceActionFactory::factoryBA(EntityItemPointer ownerEnt
|
|||
|
||||
if (action) {
|
||||
action->deserialize(data);
|
||||
}
|
||||
if (action->lifetimeIsOver()) {
|
||||
return nullptr;
|
||||
if (action->lifetimeIsOver()) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
return action;
|
||||
|
|
|
@ -1661,13 +1661,14 @@ void EntityItem::deserializeActionsInternal() {
|
|||
// TODO: make sure types match? there isn't currently a way to
|
||||
// change the type of an existing action.
|
||||
action->deserialize(serializedAction);
|
||||
action->locallyAddedButNotYetReceived = false;
|
||||
} else {
|
||||
auto actionFactory = DependencyManager::get<EntityActionFactoryInterface>();
|
||||
EntityItemPointer entity = shared_from_this();
|
||||
EntityActionPointer action = actionFactory->factoryBA(entity, serializedAction);
|
||||
if (action) {
|
||||
action->locallyAddedButNotYetReceived = false;
|
||||
entity->addActionInternal(simulation, action);
|
||||
action->locallyAddedButNotYetReceived = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue