mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58: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
|
// 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) {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user