INNER CODE UNIT · C++
predict_vel
trillek-team/tec · client/client-game-state-queue.cpp:162
glm::vec3 predict_vel = itr->second.velocities[this->client_id].linear;
velocity_diff = state_vel - predict_vel;
}
itr = this->predictions.erase(itr);
continue;
}
++itr;
}
// debugging stats, also used by reconciliation
stats.client_position = position_diff;
stats.client_velocity = velocity_diff;
}
/** \brief Explicitly update the current prediction
*/
void ClientGameStateQueue::UpdatePredictions(GameState& new_state) {
if (this->client_id == 0) {
return;