Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert the Running/Walking States #485

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Content.IntegrationTests/Tests/Slipping/SlippingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task BananaSlipTest()
#pragma warning restore NUnit2045

// Walking over the banana slowly does not trigger a slip.
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
await Move(DirectionFlag.East, 1f);
#pragma warning disable NUnit2045
Assert.That(Delta(), Is.LessThan(0.5f));
Expand All @@ -51,7 +51,7 @@ public async Task BananaSlipTest()
AssertComp<KnockedDownComponent>(false, Player);

// Moving at normal speeds does trigger a slip.
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
await Move(DirectionFlag.West, 1f);
Assert.That(sys.Slipped, Does.Contain(SEntMan.GetEntity(Player)));
AssertComp<KnockedDownComponent>(true, Player);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Movement/Components/InputMoverComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public sealed partial class InputMoverComponent : Component

public const float LerpTime = 1.0f;

public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) == 0x0;
public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) != 0x0;

[ViewVariables(VVAccess.ReadWrite)]
public bool CanMove = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public sealed partial class MovementSpeedModifierComponent : Component
public const float DefaultFriction = 20f;
public const float DefaultFrictionNoInput = 20f;

public const float DefaultBaseWalkSpeed = 2.5f;
public const float DefaultBaseSprintSpeed = 4.5f;
public const float DefaultBaseWalkSpeed = 3f;
public const float DefaultBaseSprintSpeed = 5f;

[AutoNetworkedField, ViewVariables]
public float WalkSpeedModifier = 1.0f;
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/escape-menu/ui/options-menu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ui-options-function-move-up = Move Up
ui-options-function-move-left = Move Left
ui-options-function-move-down = Move Down
ui-options-function-move-right = Move Right
ui-options-function-walk = Walk
ui-options-function-walk = Run

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

misleading fluent key

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know why this is the engine. I can't change this.

image

image


ui-options-function-camera-rotate-left = Rotate left
ui-options-function-camera-rotate-right = Rotate right
Expand Down
5 changes: 2 additions & 3 deletions Resources/Prototypes/DeltaV/Entities/Mobs/Species/harpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
False: {visible: false}
True: {visible: true}
- type: MovementSpeedModifier
baseWalkSpeed: 2.5
baseSprintSpeed: 5.0
baseWalkSpeed: 3
baseSprintSpeed: 5.5
- type: Inventory
speciesId: harpy
templateId: digitigrade
Expand All @@ -139,7 +139,6 @@
understands:
- GalacticCommon
- SolCommon

- type: entity
save: false
name: Urist McHands
Expand Down
Loading