Fix bug
This commit is contained in:
parent
ab94c12299
commit
728a1de2e5
2
main.go
2
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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user