Make MovementSpeedModifier send the actual modifier in the state (#5661)

This commit is contained in:
Leon Friedrich
2021-12-03 13:11:07 +13:00
committed by GitHub
parent a101c60013
commit 393e4145cf

View File

@@ -35,6 +35,8 @@ namespace Content.Shared.Movement.EntitySystems
{
BaseWalkSpeed = component.BaseWalkSpeed,
BaseSprintSpeed = component.BaseSprintSpeed,
WalkSpeedModifier = component.WalkSpeedModifier,
SprintSpeedModifier = component.SprintSpeedModifier
};
}
@@ -43,6 +45,8 @@ namespace Content.Shared.Movement.EntitySystems
if (args.Current is not MovementSpeedModifierComponentState state) return;
component.BaseWalkSpeed = state.BaseWalkSpeed;
component.BaseSprintSpeed = state.BaseSprintSpeed;
component.WalkSpeedModifier = state.WalkSpeedModifier;
component.SprintSpeedModifier = state.SprintSpeedModifier;
}
public void RefreshMovementSpeedModifiers(EntityUid uid)
@@ -69,6 +73,8 @@ namespace Content.Shared.Movement.EntitySystems
{
public float BaseWalkSpeed;
public float BaseSprintSpeed;
public float WalkSpeedModifier;
public float SprintSpeedModifier;
}
}