Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Game.Loop:
- var logicInterval = worldRenderer != null && worldRenderer.World.Timestep != 0 ? worldRenderer.World.Timestep : Timestep;
- // World.Timestep - 20 - 50ms, Timestep: 40 ms
- if (now >= nextLogic)
- {
- nextLogic += logicInterval;
- LogicTick();
- }
- LogicTick
- InnerLogicTick(OrderManager);
- static void InnerLogicTick(OrderManager orderManager)
- if (uiTickDelta >= Timestep) // always Timestep (40), with logicInterval 50 (game slow speed) this isn't called each 40 ms as expected
- // Ui.LastTickTime and Viewport.TicksSinceLastMove are updated later, causing e.g. flickering of tooltip due to IsVisible = () => Viewport.TicksSinceLastMove >= TooltipDelay;
- Ui.Tick();
- if (worldTimestep != 0 && worldTickDelta >= worldTimestep) // timestep consistent with Game.Loop logicInterval
- World.Tick(); // called e.g. each 20 - 50 ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement