Fix snares (#16699)
The alert for snares will appear again. Previously it was being updated on the snare itself and not the player. It is no longer possible to infinitely ensnare someone; the maximum number is dependent on the target's legs. Only one snare at a time will be removed now. Clarified the wording and logic around CanMoveBreakout. It was inconsistent. Made multiple snares impose cumulative speed penalties. It is no longer possible to remove bolas while moving.
This commit is contained in:
@@ -47,8 +47,8 @@ public abstract class SharedEnsnareableSystem : EntitySystem
|
||||
|
||||
private void OnEnsnare(EntityUid uid, EnsnareableComponent component, EnsnareEvent args)
|
||||
{
|
||||
component.WalkSpeed = args.WalkSpeed;
|
||||
component.SprintSpeed = args.SprintSpeed;
|
||||
component.WalkSpeed *= args.WalkSpeed;
|
||||
component.SprintSpeed *= args.SprintSpeed;
|
||||
|
||||
_speedModifier.RefreshMovementSpeedModifiers(uid);
|
||||
|
||||
@@ -58,6 +58,9 @@ public abstract class SharedEnsnareableSystem : EntitySystem
|
||||
|
||||
private void OnEnsnareRemove(EntityUid uid, EnsnareableComponent component, EnsnareRemoveEvent args)
|
||||
{
|
||||
component.WalkSpeed /= args.WalkSpeed;
|
||||
component.SprintSpeed /= args.SprintSpeed;
|
||||
|
||||
_speedModifier.RefreshMovementSpeedModifiers(uid);
|
||||
|
||||
var ev = new EnsnaredChangedEvent(component.IsEnsnared);
|
||||
|
||||
Reference in New Issue
Block a user