Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

Commit fe1e172

Browse files
Sprinting (real) (#193)
# Description Reverts the fucked up changes I did to movement speed on nearly every thing and instead just inverts the walking and sprinting in the input manager. # Changelog :cl: - fix: The keybind "walk" has been renamed to "sprint"
1 parent b796bb1 commit fe1e172

29 files changed

Lines changed: 89 additions & 89 deletions

File tree

Content.IntegrationTests/Tests/Slipping/SlippingTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task BananaSlipTest()
3838
#pragma warning restore NUnit2045
3939

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

4949
// Moving at normal speeds does trigger a slip.
50-
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
50+
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
5151
await Move(DirectionFlag.West, 1f);
5252
Assert.That(sys.Slipped, Does.Contain(Player));
5353
AssertComp<KnockedDownComponent>(true, Player);

Content.Shared/Movement/Components/InputMoverComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public sealed class InputMoverComponent : Component
6868

6969
public const float LerpTime = 1.0f;
7070

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

7373
[ViewVariables(VVAccess.ReadWrite)]
7474
public bool CanMove { get; set; } = true;

Content.Shared/Movement/Components/MovementSpeedModifierComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public sealed class MovementSpeedModifierComponent : Component
2222
public const float DefaultFriction = 20f;
2323
public const float DefaultFrictionNoInput = 20f;
2424

25-
public const float DefaultBaseWalkSpeed = 5f;
26-
public const float DefaultBaseSprintSpeed = 3f;
25+
public const float DefaultBaseWalkSpeed = 3f;
26+
public const float DefaultBaseSprintSpeed = 5f;
2727

2828
[ViewVariables]
2929
public float WalkSpeedModifier = 1.0f;

Resources/Locale/en-US/escape-menu/ui/options-menu.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ui-options-function-move-up = Move Up
8787
ui-options-function-move-left = Move Left
8888
ui-options-function-move-down = Move Down
8989
ui-options-function-move-right = Move Right
90-
ui-options-function-walk = Walk
90+
ui-options-function-walk = Run
9191
9292
ui-options-function-camera-rotate-left = Rotate left
9393
ui-options-function-camera-rotate-right = Rotate right

Resources/Prototypes/Entities/Mobs/NPCs/animals.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
description: Some cultures find them terrifying, others crunchy on the teeth.
66
components:
77
- type: MovementSpeedModifier
8-
baseWalkSpeed : 6
9-
baseSprintSpeed : 3
8+
baseWalkSpeed : 3
9+
baseSprintSpeed : 6
1010
- type: Sprite
1111
drawdepth: Mobs
1212
layers:
@@ -73,8 +73,8 @@
7373
components:
7474
- type: CombatMode
7575
- type: MovementSpeedModifier
76-
baseWalkSpeed : 7
77-
baseSprintSpeed : 4
76+
baseWalkSpeed : 4
77+
baseSprintSpeed : 7
7878
- type: Sprite
7979
drawdepth: Mobs
8080
layers:
@@ -315,8 +315,8 @@
315315
description: Despite popular misconceptions, it's not actually made of butter.
316316
components:
317317
- type: MovementSpeedModifier
318-
baseWalkSpeed : 6
319-
baseSprintSpeed : 4
318+
baseWalkSpeed : 4
319+
baseSprintSpeed : 6
320320
- type: Sprite
321321
drawdepth: Mobs
322322
layers:
@@ -727,8 +727,8 @@
727727
description: A large marsupial herbivore. It has powerful hind legs, with nails that resemble long claws.
728728
components:
729729
- type: MovementSpeedModifier
730-
baseWalkSpeed: 4.5
731-
baseSprintSpeed: 3.5
730+
baseWalkSpeed: 3.5
731+
baseSprintSpeed: 4.5
732732
- type: Sprite
733733
drawdepth: Mobs
734734
layers:
@@ -959,8 +959,8 @@
959959
10: Critical
960960
20: Dead
961961
- type: MovementSpeedModifier
962-
baseWalkSpeed : 5
963-
baseSprintSpeed : 3
962+
baseWalkSpeed : 3
963+
baseSprintSpeed : 5
964964
- type: Appearance
965965
- type: DamageStateVisuals
966966
states:
@@ -1104,8 +1104,8 @@
11041104
description: A harmless dragon.
11051105
components:
11061106
- type: MovementSpeedModifier
1107-
baseWalkSpeed : 3
1108-
baseSprintSpeed : 2
1107+
baseWalkSpeed : 2
1108+
baseSprintSpeed : 3
11091109
- type: Sprite
11101110
drawdepth: Mobs
11111111
layers:
@@ -1156,8 +1156,8 @@
11561156
description: And they called this a lizard?
11571157
components:
11581158
- type: MovementSpeedModifier
1159-
baseWalkSpeed : 3
1160-
baseSprintSpeed : 2
1159+
baseWalkSpeed : 2
1160+
baseSprintSpeed : 3
11611161
- type: Sprite
11621162
drawdepth: Mobs
11631163
layers:
@@ -1203,8 +1203,8 @@
12031203
description: Hop hop hop. Lookin' moist.
12041204
components:
12051205
- type: MovementSpeedModifier
1206-
baseWalkSpeed : 6
1207-
baseSprintSpeed : 4
1206+
baseWalkSpeed : 4
1207+
baseSprintSpeed : 6
12081208
- type: Sprite
12091209
drawdepth: Mobs
12101210
layers:
@@ -1267,8 +1267,8 @@
12671267
description: Infiltrates your domain, spies on you, and somehow still a cool pet.
12681268
components:
12691269
- type: MovementSpeedModifier
1270-
baseWalkSpeed : 6
1271-
baseSprintSpeed : 3
1270+
baseWalkSpeed : 3
1271+
baseSprintSpeed : 6
12721272
- type: Sprite
12731273
drawdepth: Mobs
12741274
layers:
@@ -1395,8 +1395,8 @@
13951395
description: A small penguin with a grenade strapped around its neck. Harvested by the Syndicate from icy shit-hole planets.
13961396
components:
13971397
- type: MovementSpeedModifier
1398-
baseWalkSpeed : 5
1399-
baseSprintSpeed : 3.5
1398+
baseWalkSpeed : 3.5
1399+
baseSprintSpeed : 5
14001400
- type: InputMover
14011401
- type: MobMover
14021402
- type: NpcFactionMember
@@ -2108,8 +2108,8 @@
21082108
description: Very slow animal. For people with low energy.
21092109
components:
21102110
- type: MovementSpeedModifier
2111-
baseWalkSpeed : 1.5
2112-
baseSprintSpeed : 1
2111+
baseWalkSpeed : 1
2112+
baseSprintSpeed : 1.5
21132113
- type: Sprite
21142114
drawdepth: Mobs
21152115
sprite: Mobs/Pets/sloth.rsi
@@ -2264,8 +2264,8 @@
22642264
40: Critical
22652265
60: Dead
22662266
- type: MovementSpeedModifier
2267-
baseWalkSpeed : 4
2268-
baseSprintSpeed : 2
2267+
baseWalkSpeed : 2
2268+
baseSprintSpeed : 4
22692269
- type: Appearance
22702270
- type: Inventory
22712271
speciesId: hamster

Resources/Prototypes/Entities/Mobs/NPCs/mimic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
types:
4343
Blunt: 20
4444
- type: MovementSpeedModifier
45-
baseWalkSpeed : 1.5
46-
baseSprintSpeed : 1
45+
baseWalkSpeed : 1
46+
baseSprintSpeed : 1.5

Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
components:
77
- type: CombatMode
88
- type: MovementSpeedModifier
9-
baseWalkSpeed : 5
10-
baseSprintSpeed : 3
9+
baseWalkSpeed : 3
10+
baseSprintSpeed : 5
1111
- type: InputMover
1212
- type: MobMover
1313
- type: Reactive
@@ -203,8 +203,8 @@
203203
components:
204204
- type: CombatMode
205205
- type: MovementSpeedModifier
206-
baseWalkSpeed : 4
207-
baseSprintSpeed : 3
206+
baseWalkSpeed : 3
207+
baseSprintSpeed : 4
208208
- type: InputMover
209209
- type: MobMover
210210
- type: HTN

Resources/Prototypes/Entities/Mobs/NPCs/revenant.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
- type: Input
1010
context: "ghost"
1111
- type: MovementSpeedModifier
12-
baseWalkSpeed: 6.5
13-
baseSprintSpeed: 4
12+
baseWalkSpeed: 4
13+
baseSprintSpeed: 6.5
1414
- type: Sprite
1515
noRot: true
1616
drawdepth: Ghosts

Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
layer:
3434
- MobLayer
3535
- type: MovementSpeedModifier
36-
baseWalkSpeed : 4
37-
baseSprintSpeed : 3
36+
baseWalkSpeed : 3
37+
baseSprintSpeed : 4
3838
- type: Sprite
3939
noRot: true
4040
drawdepth: Mobs
@@ -212,8 +212,8 @@
212212
absorbed:
213213
maxVol: 50
214214
- type: MovementSpeedModifier
215-
baseWalkSpeed: 3
216-
baseSprintSpeed: 2
215+
baseWalkSpeed: 2
216+
baseSprintSpeed: 3
217217
- type: NoSlip
218218
- type: HTN
219219
rootTask: CleanbotCompound

Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
factions:
2424
- SimpleNeutral
2525
- type: MovementSpeedModifier
26-
baseWalkSpeed : 4.5
27-
baseSprintSpeed : 3
26+
baseWalkSpeed : 3
27+
baseSprintSpeed : 4.5
2828
- type: HealthExaminable
2929
examinableTypes:
3030
- Blunt

0 commit comments

Comments
 (0)