public Session() { UiInput = new UiInput(this); HudUi = new Hud(this); TargetUi = new TargetUi(this); DsUtil = new DSUtils(this); DsUtil2 = new DSUtils(this); StallReporter = new StallReporter(); InnerStallReporter = new StallReporter(); Av = new RunAv(this); Api = new ApiBackend(this); ApiServer = new ApiServer(this); Projectiles = new Projectiles.Projectiles(this); AcqManager = new AcquireManager(this); TerminalMon = new TerminalMonitor(this); _cachedEwarPacket.Data = new List <EwarValues>(32); ProblemRep = new ProblemReport(this); VisDirToleranceCosine = Math.Cos(MathHelper.ToRadians(VisDirToleranceAngle)); AimDirToleranceCosine = Math.Cos(MathHelper.ToRadians(AimDirToleranceAngle)); VoxelCaches[ulong.MaxValue] = new VoxelCache(); HeatEmissives = CreateHeatEmissive(); LoadVanillaData(); for (int i = 0; i < AuthorSettings.Length; i++) { AuthorSettings[i] = -1; } }
public override void HandleInput() { if (HandlesInput) { UiInput.UpdateInputState(); } }
public override void HandleInput() { if (HandlesInput) { UiInput.UpdateInputState(); if (MpActive) { if (UiInput.MouseButtonPressed != UiInput.MouseButtonWasPressed && ActiveControlBlock != null) { SendMouseUpdate(ActiveControlBlock); } if (ClientGridResyncRequests.Count > 0) { ProccessGridResyncRequests(); } if (PacketsToClient.Count > 0) { ProccessServerPacketsForClients(); } if (PacketsToServer.Count > 0) { ProccessClientPacketsForServer(); } if (ClientSideErrorPktList.Count > 0) { ReproccessClientErrorPackets(); } } } }
public Session() { UiInput = new UiInput(this); TargetUi = new TargetUi(this); WheelUi = new Wheel(this); HudUi = new Hud(this); DsUtil = new DSUtils(this); DsUtil2 = new DSUtils(this); StallReporter = new StallReporter(this); Av = new RunAv(this); Api = new ApiBackend(this); ApiServer = new ApiServer(this); Projectiles = new Projectiles.Projectiles(this); Proccessor = new NetworkProccessor(this); VisDirToleranceCosine = Math.Cos(MathHelper.ToRadians(VisDirToleranceAngle)); AimDirToleranceCosine = Math.Cos(MathHelper.ToRadians(AimDirToleranceAngle)); HeatEmissives = CreateHeatEmissive(); LoadVanillaData(); CoreWorkOpt.TaskType = CastProhibit(CoreWorkOpt.TaskType, 5); CoreWorkOpt.MaximumThreads = 1; foreach (var suit in (PacketType[])Enum.GetValues(typeof(PacketType))) { PacketPools.Add(suit, new MyConcurrentPool <Packet>(128, packet => packet.CleanUp())); } }
public override void HandleInput() { if (HandlesInput && !SuppressWc) { if (ControlRequest != ControlQuery.None) { UpdateControlKeys(); } UiInput.UpdateInputState(); if (MpActive) { if (UiInput.InputChanged && ActiveControlBlock != null) { SendMouseUpdate(TrackingAi, ActiveControlBlock); } if (TrackingAi != null && TargetUi.DrawReticle) { var dummyTargets = PlayerDummyTargets[PlayerId]; if (dummyTargets.ManualTarget.LastUpdateTick == Tick) { SendAimTargetUpdate(TrackingAi, dummyTargets.ManualTarget); } if (dummyTargets.PaintedTarget.LastUpdateTick == Tick) { SendPaintedTargetUpdate(TrackingAi, dummyTargets.PaintedTarget); } } if (PacketsToServer.Count > 0) { ProccessClientPacketsForServer(); } } if (Tick60 && SoundsToClean.Count > 0) { CleanSounds(); } } }