Merge branch 'master' into buckle-locker-fix-1262
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
@@ -13,8 +14,6 @@ using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace Content.Shared.GameObjects.Components.Movement
|
||||
{
|
||||
public abstract class SharedPlayerInputMoverComponent : Component, IMoverComponent, ICollideSpecial
|
||||
@@ -189,11 +188,16 @@ namespace Content.Shared.GameObjects.Components.Movement
|
||||
_lastInputSubTick = 0;
|
||||
}
|
||||
|
||||
var fraction = (subTick - _lastInputSubTick) / (float) ushort.MaxValue;
|
||||
if (subTick >= _lastInputSubTick)
|
||||
{
|
||||
var fraction = (subTick - _lastInputSubTick) / (float) ushort.MaxValue;
|
||||
|
||||
ref var lastMoveAmount = ref Sprinting ? ref _curTickSprintMovement : ref _curTickWalkMovement;
|
||||
ref var lastMoveAmount = ref Sprinting ? ref _curTickSprintMovement : ref _curTickWalkMovement;
|
||||
|
||||
lastMoveAmount += DirVecForButtons(_heldMoveButtons) * fraction;
|
||||
lastMoveAmount += DirVecForButtons(_heldMoveButtons) * fraction;
|
||||
|
||||
_lastInputSubTick = subTick;
|
||||
}
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
@@ -204,8 +208,6 @@ namespace Content.Shared.GameObjects.Components.Movement
|
||||
_heldMoveButtons &= ~bit;
|
||||
}
|
||||
|
||||
_lastInputSubTick = subTick;
|
||||
|
||||
Dirty();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user