Skip to content

Commit

Permalink
Use ComponentState::PeriodicChange in UpdateState to avoid forcing fu…
Browse files Browse the repository at this point in the history
…ll scene update (#486)

Signed-off-by: Ivan Santiago Paunovic <[email protected]>

Co-authored-by: Louise Poubel <[email protected]>
  • Loading branch information
ivanpauno and chapulina authored Jan 15, 2021
1 parent 42e4dc4 commit d5f96fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/EntityComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,9 @@ void EntityComponentManager::SetState(
std::istringstream istr(compMsg.component());
comp->Deserialize(istr);
this->SetChanged(entity, compIter.first,
ComponentState::OneTimeChange);
_stateMsg.has_one_time_component_changes() ?
ComponentState::OneTimeChange :
ComponentState::PeriodicChange);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/network/NetworkManagerSecondary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ void NetworkManagerSecondary::OnStep(
msgs::SerializedStateMap stateMsg;
if (!entities.empty())
this->dataPtr->ecm->State(stateMsg, entities);
stateMsg.set_has_one_time_component_changes(
this->dataPtr->ecm->HasOneTimeComponentChanges());

this->stepAckPub.Publish(stateMsg);

Expand Down

0 comments on commit d5f96fb

Please sign in to comment.