Reduce knocked down players tile friction (#11035)
This commit is contained in:
15
Content.Shared/Movement/Events/TileFrictionEvent.cs
Normal file
15
Content.Shared/Movement/Events/TileFrictionEvent.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Content.Shared.Movement.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Raised to try and get any tile friction modifiers for a particular body.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public struct TileFrictionEvent
|
||||
{
|
||||
public float Modifier;
|
||||
|
||||
public TileFrictionEvent(float modifier)
|
||||
{
|
||||
Modifier = modifier;
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ namespace Content.Shared.Movement.Systems
|
||||
InitializeRelay();
|
||||
_configManager.OnValueChanged(CCVars.RelativeMovement, SetRelativeMovement, true);
|
||||
_configManager.OnValueChanged(CCVars.StopSpeed, SetStopSpeed, true);
|
||||
UpdatesBefore.Add(typeof(SharedTileFrictionController));
|
||||
UpdatesBefore.Add(typeof(TileFrictionController));
|
||||
}
|
||||
|
||||
private void SetRelativeMovement(bool value) => _relativeMovement = value;
|
||||
|
||||
Reference in New Issue
Block a user