This commit is contained in:
Bruno Rybársky 2024-08-30 21:08:12 +02:00
parent ab94c12299
commit 728a1de2e5

@ -226,6 +226,7 @@ func main() {
deltaTime := currentTime - prevTime
prevTime = currentTime
worldLock.Lock()
playerUpdateMutex.Lock()
// Catch up in case of a large delta time
for deltaTime > maxDeltaTime {
@ -281,6 +282,7 @@ func main() {
resetMapProfilingCounters(&totalRenderTime, &totalScalingTime, &totalFrameTime, &frameCount)
}
worldLock.Unlock()
playerUpdateMutex.Unlock()
enforceFrameRate(currentTime, 60)
}
}