INNER CODE UNIT · C++

predict_pos

trillek-team/tec · client/client-game-state-queue.cpp:159

				glm::vec3 predict_pos = itr->second.positions[this->client_id].value;
				position_diff = state_pos - predict_pos;
				glm::vec3 state_vel = new_state.velocities[this->client_id].linear;
				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
*/

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…