Properly fix chair collision & disallow pulling objects you're buckled to (#3241)
Co-authored-by: cyclowns <cyclowns@protonmail.ch>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.GameObjects.Components.Buckle;
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Buckle;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
@@ -19,7 +20,7 @@ namespace Content.Client.GameObjects.Components.Buckle
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
|
||||
{
|
||||
if (curState is not BuckleComponentState buckle)
|
||||
{
|
||||
@@ -30,7 +31,7 @@ namespace Content.Client.GameObjects.Components.Buckle
|
||||
LastEntityBuckledTo = buckle.LastEntityBuckledTo;
|
||||
DontCollide = buckle.DontCollide;
|
||||
|
||||
if (!Owner.TryGetComponent(out SpriteComponent ownerSprite))
|
||||
if (!Owner.TryGetComponent(out SpriteComponent? ownerSprite))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user