From adb6a2c60956bbe8e2f4c225ee943d2315375dba Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Wed, 27 Jul 2022 20:54:42 -0700 Subject: [PATCH] Fix racing lap times (#683) --- dGame/dComponents/RacingControlComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dGame/dComponents/RacingControlComponent.cpp b/dGame/dComponents/RacingControlComponent.cpp index e157ca5f..770679e5 100644 --- a/dGame/dComponents/RacingControlComponent.cpp +++ b/dGame/dComponents/RacingControlComponent.cpp @@ -818,7 +818,7 @@ void RacingControlComponent::Update(float deltaTime) { // Reached the start point, lapped if (respawnIndex == 0) { - time_t lapTime = std::time(nullptr) - (player.lap == 1 ? m_StartTime : player.lapTime); + time_t lapTime = std::time(nullptr) - (player.lap == 0 ? m_StartTime : player.lapTime); // Cheating check if (lapTime < 40) {