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) } }