code review

This commit is contained in:
Seth Alves 2015-10-05 11:28:59 -07:00
parent a737b4024d
commit 993111d22f
2 changed files with 5 additions and 4 deletions

View file

@ -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;

View file

@ -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;
}
}
}