Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GameConditionManager.MapBrightnessTracker (Unnatural Darkness) de…
…syncs (#453) GameConditionManager.MapBrightnessTracker:Tick uses Time.deltaTime, the value of which will be different between the players. With similar FPS they'll be very close to one another, but if there's a big change between FPS values (for example, 60 and 144) the issue will be much bigger. The issue with MapBrightnessTracker is the map will get darker at a different rate for each player - in one of my tests, the client finished the transition 10 ticks faster than the host. The fix here is rather simple - replace `deltaTime` with a constant value of `1 / 60` or `0.166666...` to ensure each 60 ticks in-game will be treated as a second, no matter the game speed.
- Loading branch information