Properly fix chair collision & disallow pulling objects you're buckled to (#3241)

Co-authored-by: cyclowns <cyclowns@protonmail.ch>
This commit is contained in:
mirrorcult
2021-02-16 01:42:03 -07:00
committed by GitHub
parent 372d994f16
commit 1ab8d3e6e9
3 changed files with 52 additions and 31 deletions

View File

@@ -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;
}