示例#1
0
 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();
             }
         }
     }
 }
示例#2
0
 public override void HandleInput()
 {
     if (HandlesInput)
     {
         UiInput.UpdateInputState();
     }
 }
示例#3
0
        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();
                }
            }
        }