mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +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) {
|
if (action) {
|
||||||
action->deserialize(data);
|
action->deserialize(data);
|
||||||
}
|
if (action->lifetimeIsOver()) {
|
||||||
if (action->lifetimeIsOver()) {
|
return nullptr;
|
||||||
return nullptr;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
|
|
|
@ -1661,13 +1661,14 @@ void EntityItem::deserializeActionsInternal() {
|
||||||
// TODO: make sure types match? there isn't currently a way to
|
// TODO: make sure types match? there isn't currently a way to
|
||||||
// change the type of an existing action.
|
// change the type of an existing action.
|
||||||
action->deserialize(serializedAction);
|
action->deserialize(serializedAction);
|
||||||
|
action->locallyAddedButNotYetReceived = false;
|
||||||
} else {
|
} else {
|
||||||
auto actionFactory = DependencyManager::get<EntityActionFactoryInterface>();
|
auto actionFactory = DependencyManager::get<EntityActionFactoryInterface>();
|
||||||
EntityItemPointer entity = shared_from_this();
|
EntityItemPointer entity = shared_from_this();
|
||||||
EntityActionPointer action = actionFactory->factoryBA(entity, serializedAction);
|
EntityActionPointer action = actionFactory->factoryBA(entity, serializedAction);
|
||||||
if (action) {
|
if (action) {
|
||||||
action->locallyAddedButNotYetReceived = false;
|
|
||||||
entity->addActionInternal(simulation, action);
|
entity->addActionInternal(simulation, action);
|
||||||
|
action->locallyAddedButNotYetReceived = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue