Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarTime.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-19 13:35:55 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-19 13:35:55 +1100
commit5ca42599ef52236274938dba9bd6e113611cb734 (patch)
treed8eea4d1064ba0821f173f3f154646c142d21884 /source/core/StarTime.cpp
parent5f01d2d4d7c19e280f02cd2e0ecd73990f2373a4 (diff)
make timescale a server command and add a tickrate command
Diffstat (limited to 'source/core/StarTime.cpp')
-rw-r--r--source/core/StarTime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/core/StarTime.cpp b/source/core/StarTime.cpp
index f64b850..96cbdde 100644
--- a/source/core/StarTime.cpp
+++ b/source/core/StarTime.cpp
@@ -147,7 +147,7 @@ void Clock::setMilliseconds(int64_t millis) {
void Clock::adjustTime(double timeAdjustment) {
RecursiveMutexLocker locker(m_mutex);
- setTime(time() + timeAdjustment);
+ setTime(max<double>(0.0, time() + timeAdjustment));
}
void Clock::adjustMilliseconds(int64_t millisAdjustment) {