INNER CODE UNIT · C++
entity
trillek-team/tec · client/client-game-state-queue.cpp:192
const proto::Entity& entity = data->entity;
eid entity_id = entity.id();
for (int i = 0; i < entity.components_size(); ++i) {
const proto::Component& comp = entity.components(i);
switch (comp.component_case()) {
case proto::Component::kPosition:
{
Position pos;
pos.In(comp);
this->interpolated_state.positions[entity_id] = pos;
this->base_state.positions[entity_id] = pos;
break;
}
case proto::Component::kOrientation:
{
Orientation orientation;
orientation.In(comp);
this->interpolated_state.orientations[entity_id] = orientation;