diff --git a/Content.Client/Input/ContentContexts.cs b/Content.Client/Input/ContentContexts.cs index 279b238217..f9636dc01f 100644 --- a/Content.Client/Input/ContentContexts.cs +++ b/Content.Client/Input/ContentContexts.cs @@ -39,7 +39,7 @@ namespace Content.Client.Input ghost.AddFunction(EngineKeyFunctions.MoveDown); ghost.AddFunction(EngineKeyFunctions.MoveLeft); ghost.AddFunction(EngineKeyFunctions.MoveRight); - ghost.AddFunction(EngineKeyFunctions.Run); + ghost.AddFunction(EngineKeyFunctions.Walk); ghost.AddFunction(ContentKeyFunctions.OpenContextMenu); common.AddFunction(ContentKeyFunctions.OpenEntitySpawnWindow); diff --git a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs index 125bafc35d..7a22249763 100644 --- a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs @@ -73,9 +73,9 @@ namespace Content.Server.GameObjects.EntitySystems var moveDownCmdHandler = InputCmdHandler.FromDelegate( session => HandleDirChange(session, Direction.South, true), session => HandleDirChange(session, Direction.South, false)); - var runCmdHandler = InputCmdHandler.FromDelegate( - session => HandleRunChange(session, false), - session => HandleRunChange(session, true)); + var walkCmdHandler = InputCmdHandler.FromDelegate( + session => HandleRunChange(session, true), + session => HandleRunChange(session, false)); var input = EntitySystemManager.GetEntitySystem(); @@ -84,7 +84,7 @@ namespace Content.Server.GameObjects.EntitySystems .Bind(EngineKeyFunctions.MoveLeft, moveLeftCmdHandler) .Bind(EngineKeyFunctions.MoveRight, moveRightCmdHandler) .Bind(EngineKeyFunctions.MoveDown, moveDownCmdHandler) - .Bind(EngineKeyFunctions.Run, runCmdHandler) + .Bind(EngineKeyFunctions.Walk, walkCmdHandler) .Register(); SubscribeLocalEvent(PlayerAttached); @@ -265,12 +265,12 @@ namespace Content.Server.GameObjects.EntitySystems moverComp.SetVelocityDirection(dir, state); } - private static void HandleRunChange(ICommonSession session, bool running) + private static void HandleRunChange(ICommonSession session, bool walking) { if (!TryGetAttachedComponent(session as IPlayerSession, out PlayerInputMoverComponent moverComp)) return; - moverComp.Sprinting = running; + moverComp.Sprinting = !walking; } private static bool TryGetAttachedComponent(IPlayerSession session, out T component) diff --git a/Resources/keybinds.yml b/Resources/keybinds.yml index 85aae27e3f..29388101ed 100644 --- a/Resources/keybinds.yml +++ b/Resources/keybinds.yml @@ -34,7 +34,7 @@ binds: - function: MoveDown type: State key: S -- function: Run +- function: Walk type: State key: Shift - function: ShowEscapeMenu