is this what you wanted

This commit is contained in:
David Markowitz 2024-06-12 19:15:11 -07:00
parent 642d41b9f6
commit 71642a24bf
2 changed files with 4 additions and 4 deletions

View File

@ -828,8 +828,8 @@ void RacingControlComponent::Update(float deltaTime) {
// Reached the start point, lapped // Reached the start point, lapped
if (respawnIndex == 0) { if (respawnIndex == 0) {
auto now = std::chrono::high_resolution_clock::now(); const auto now = std::chrono::high_resolution_clock::now();
auto lapTime = std::chrono::duration_cast<std::chrono::milliseconds>(now - (player.lap == 0 ? m_StartTime : player.lapTime)); const auto lapTime = std::chrono::duration_cast<std::chrono::milliseconds>(now - (player.lap == 0 ? m_StartTime : player.lapTime));
// Cheating check // Cheating check
if (lapTime.count() < 40000) { if (lapTime.count() < 40000) {

View File

@ -78,7 +78,7 @@ struct RacingPlayerInfo {
/** /**
* The current lap time of the player * The current lap time of the player
*/ */
std::chrono::system_clock::time_point lapTime; std::chrono::high_resolution_clock::time_point lapTime;
/** /**
* The number of times this player smashed their car * The number of times this player smashed their car
@ -232,7 +232,7 @@ private:
/** /**
* The time the race was started * The time the race was started
*/ */
std::chrono::system_clock::time_point m_StartTime; std::chrono::high_resolution_clock::time_point m_StartTime;
/** /**
* Timer for tracking how long a player was alone in this race * Timer for tracking how long a player was alone in this race