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