Fix SuperSlippery And StepTriggers persisting when UpdateSlip is called (#34525)
* Fix superSlippery and stepTrigger values persist - made values in SpillTileReaction's public so we can query the prototype - made the default values for slippery component and StepTriggerComponent based on default constants for easier resetting - added a calculation and check in UpdateSlips to check if a super slip is present as well as Update relevant steptrigger and slip values based on the contents of the solution * The worlds biggest change --------- Co-authored-by: Myra <vascreeper@yahoo.com>
This commit is contained in:
@@ -13,6 +13,8 @@ namespace Content.Shared.Slippery
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class SlipperyComponent : Component
|
||||
{
|
||||
public const float DefaultParalyzeTime = 1.5f;
|
||||
public const float DefaultLaunchForwardsMultiplier = 1.5f;
|
||||
/// <summary>
|
||||
/// Path to the sound to be played when a mob slips.
|
||||
/// </summary>
|
||||
@@ -25,14 +27,14 @@ namespace Content.Shared.Slippery
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[Access(Other = AccessPermissions.ReadWrite)]
|
||||
public float ParalyzeTime = 1.5f;
|
||||
public float ParalyzeTime = DefaultParalyzeTime;
|
||||
|
||||
/// <summary>
|
||||
/// The entity's speed will be multiplied by this to slip it forwards.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
[Access(Other = AccessPermissions.ReadWrite)]
|
||||
public float LaunchForwardsMultiplier = 1.5f;
|
||||
public float LaunchForwardsMultiplier = DefaultLaunchForwardsMultiplier;
|
||||
|
||||
/// <summary>
|
||||
/// If this is true, any slipping entity loses its friction until
|
||||
|
||||
Reference in New Issue
Block a user