private void Timings() { Tick = (uint)(Session.ElapsedPlayTime.TotalMilliseconds * TickTimeDiv); Tick10 = Tick % 10 == 0; Tick20 = Tick % 20 == 0; Tick30 = Tick % 30 == 0; Tick60 = Tick % 60 == 0; Tick60 = Tick % 60 == 0; Tick180 = Tick % 120 == 0; Tick180 = Tick % 180 == 0; Tick300 = Tick % 300 == 0; Tick600 = Tick % 600 == 0; Tick1800 = Tick % 1800 == 0; if (Tick10 && RingOverFlows > 0) { RingOverFlows--; } if (_count++ == 59) { _count = 0; _lCount++; if (_lCount == 10) { _lCount = 0; _eCount++; if (_eCount == 10) { _eCount = 0; _previousEntId = -1; } } } if (!GameLoaded) { if (!MiscLoaded) { if (SessionReady && GlobalProtect.Count > 0 && (IsServer || !IsServer && ClientLoadCount++ > 120)) { UtilsStatic.GetDefinitons(); if (!IsServer) { Players.TryAdd(MyAPIGateway.Session.Player.IdentityId, MyAPIGateway.Session.Player); } Api.Init(); MiscLoaded = true; GameLoaded = true; if (!string.IsNullOrEmpty(PlayerMessage)) { MyAPIGateway.Utilities.ShowNotification(PlayerMessage, 10000, "White"); } } } } if (!PlayersLoaded && KeenFuckery()) { PlayersLoaded = true; } if (Tick20) { Scale(); EntSlotTick = Tick % (180 / EntSlotScaler) == 0; if (EntSlotTick || FastRefresh) { LoadBalancer(); } } else { EntSlotTick = false; } }
private void Timings() { Tick = (uint)(Session.ElapsedPlayTime.TotalMilliseconds * TickTimeDiv); Tick20 = Tick % 20 == 0; Tick30 = Tick % 30 == 0; Tick60 = Tick % 60 == 0; Tick60 = Tick % 60 == 0; Tick180 = Tick % 180 == 0; Tick300 = Tick % 300 == 0; Tick600 = Tick % 600 == 0; Tick1800 = Tick % 1800 == 0; if (_count++ == 59) { _count = 0; _lCount++; if (_lCount == 10) { _lCount = 0; _eCount++; if (_eCount == 10) { _eCount = 0; _previousEntId = -1; } } } if (!GameLoaded) { if (!MiscLoaded) { if (SessionReady && GlobalProtect.Count > 0 && (IsServer || !IsServer && ClientLoadCount++ > 60)) { UtilsStatic.GetDefinitons(); if (!IsServer) { Players.TryAdd(MyAPIGateway.Session.Player.IdentityId, MyAPIGateway.Session.Player); } Api.Init(); MiscLoaded = true; GameLoaded = true; } } if (MiscLoaded && !WarHeadLoaded && WarTerminalReset != null) { WarTerminalReset.ShowInTerminal = true; WarTerminalReset = null; WarHeadLoaded = true; GameLoaded = true; } } if (EmpWork.EventRunning && EmpWork.Computed) { EmpWork.EventComplete(); } if (Tick20) { Scale(); EntSlotTick = Tick % (180 / EntSlotScaler) == 0; if (EntSlotTick) { LoadBalancer(); } } else { EntSlotTick = false; } }
private void Timings() { _newFrame = true; Tick = (uint)(Session.ElapsedPlayTime.TotalMilliseconds * TickTimeDiv); Tick20 = Tick % 20 == 0; Tick60 = Tick % 60 == 0; Tick60 = Tick % 60 == 0; Tick180 = Tick % 180 == 0; Tick600 = Tick % 600 == 0; Tick1800 = Tick % 1800 == 0; if (_count++ == 59) { _count = 0; _lCount++; if (_lCount == 10) { _lCount = 0; _eCount++; if (_eCount == 10) { _eCount = 0; } } } if (!GameLoaded && Tick > 100) { if (!WarHeadLoaded && WarTerminalReset != null) { WarTerminalReset.ShowInTerminal = true; WarTerminalReset = null; WarHeadLoaded = true; } if (!MiscLoaded) { MiscLoaded = true; UtilsStatic.GetDefinitons(); if (!IsServer) { Players.TryAdd(MyAPIGateway.Session.Player.IdentityId, MyAPIGateway.Session.Player); } } GameLoaded = true; } if (EmpWork.EventRunning && EmpWork.Computed) { EmpWork.EventComplete(); } if (Tick20) { Scale(); EntSlotTick = Tick % (180 / EntSlotScaler) == 0; if (EntSlotTick) { LoadBalancer(); } } else { EntSlotTick = false; } }