Fix buckle component exception when Removed from entity.
This commit is contained in:
@@ -334,7 +334,7 @@ namespace Content.Server.Buckle.Components
|
||||
|
||||
Appearance?.SetData(BuckleVisuals.Buckled, false);
|
||||
|
||||
if (_stunnable != null && _stunnable.KnockedDown
|
||||
if (_stunnable is { KnockedDown: true }
|
||||
|| (_mobState?.IsIncapacitated() ?? false))
|
||||
{
|
||||
EntitySystem.Get<StandingStateSystem>().Down(Owner);
|
||||
@@ -386,7 +386,7 @@ namespace Content.Server.Buckle.Components
|
||||
UpdateBuckleStatus();
|
||||
}
|
||||
|
||||
protected override void OnRemove()
|
||||
protected override void Shutdown()
|
||||
{
|
||||
BuckledTo?.Remove(this);
|
||||
TryUnbuckle(Owner, true);
|
||||
@@ -394,7 +394,7 @@ namespace Content.Server.Buckle.Components
|
||||
_buckleTime = default;
|
||||
UpdateBuckleStatus();
|
||||
|
||||
base.OnRemove();
|
||||
base.Shutdown();
|
||||
}
|
||||
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
|
||||
Reference in New Issue
Block a user