mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 09:48:20 +00:00
is this what you wanted
This commit is contained in:
parent
642d41b9f6
commit
71642a24bf
@ -828,8 +828,8 @@ void RacingControlComponent::Update(float deltaTime) {
|
||||
|
||||
// Reached the start point, lapped
|
||||
if (respawnIndex == 0) {
|
||||
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 now = std::chrono::high_resolution_clock::now();
|
||||
const auto lapTime = std::chrono::duration_cast<std::chrono::milliseconds>(now - (player.lap == 0 ? m_StartTime : player.lapTime));
|
||||
|
||||
// Cheating check
|
||||
if (lapTime.count() < 40000) {
|
||||
|
@ -78,7 +78,7 @@ struct RacingPlayerInfo {
|
||||
/**
|
||||
* 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
|
||||
@ -232,7 +232,7 @@ private:
|
||||
/**
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user