From 728a1de2e510cba8dbef3b1e2d762e03ef857374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Fri, 30 Aug 2024 21:08:12 +0200 Subject: [PATCH] Fix bug --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 7e63e58..410cfe9 100644 --- a/main.go +++ b/main.go @@ -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) } }