From a4fc33284682c9471a8dfa16fcb09bf6e2b3b559 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Mon, 24 Jul 2023 21:59:31 +1200 Subject: [PATCH] Fix some some bugs when client-side prediction is disabled (#18241) --- Content.Client/Construction/ConstructionSystem.cs | 4 ++-- Content.Client/DragDrop/DragDropSystem.cs | 2 +- .../UserInterface/Systems/Actions/ActionUIController.cs | 2 +- Content.Client/Weapons/Melee/MeleeWeaponSystem.cs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Content.Client/Construction/ConstructionSystem.cs b/Content.Client/Construction/ConstructionSystem.cs index 02ba8282c6..18790ed00e 100644 --- a/Content.Client/Construction/ConstructionSystem.cs +++ b/Content.Client/Construction/ConstructionSystem.cs @@ -45,11 +45,11 @@ namespace Content.Client.Construction CommandBinds.Builder .Bind(ContentKeyFunctions.OpenCraftingMenu, - new PointerInputCmdHandler(HandleOpenCraftingMenu)) + new PointerInputCmdHandler(HandleOpenCraftingMenu, outsidePrediction:true)) .Bind(EngineKeyFunctions.Use, new PointerInputCmdHandler(HandleUse, outsidePrediction: true)) .Bind(ContentKeyFunctions.EditorFlipObject, - new PointerInputCmdHandler(HandleFlip)) + new PointerInputCmdHandler(HandleFlip, outsidePrediction:true)) .Register(); SubscribeLocalEvent(HandleConstructionGhostExamined); diff --git a/Content.Client/DragDrop/DragDropSystem.cs b/Content.Client/DragDrop/DragDropSystem.cs index c7a6718e76..8696f78355 100644 --- a/Content.Client/DragDrop/DragDropSystem.cs +++ b/Content.Client/DragDrop/DragDropSystem.cs @@ -118,7 +118,7 @@ public sealed class DragDropSystem : SharedDragDropSystem _dropTargetOutOfRangeShader = _prototypeManager.Index(ShaderDropTargetOutOfRange).Instance(); // needs to fire on mouseup and mousedown so we can detect a drag / drop CommandBinds.Builder - .BindBefore(EngineKeyFunctions.Use, new PointerInputCmdHandler(OnUse, false), new[] { typeof(SharedInteractionSystem) }) + .BindBefore(EngineKeyFunctions.Use, new PointerInputCmdHandler(OnUse, false, true), new[] { typeof(SharedInteractionSystem) }) .Register(); } diff --git a/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs b/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs index 51e5ffcb22..d76205e407 100644 --- a/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs +++ b/Content.Client/UserInterface/Systems/Actions/ActionUIController.cs @@ -136,7 +136,7 @@ public sealed class ActionUIController : UIController, IOnStateChanged(OnDamageEffect); SubscribeNetworkEvent(OnMeleeLunge); + UpdatesOutsidePrediction = true; } public override void Shutdown()