Fix resolve error when FollowedComponent is not found in StopFollowingEntity (#7276)
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
|
using Content.Shared.Follower.Components;
|
||||||
using Content.Shared.Ghost;
|
using Content.Shared.Ghost;
|
||||||
using Content.Shared.Movement.EntitySystems;
|
using Content.Shared.Movement.EntitySystems;
|
||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
using Robust.Shared.Localization;
|
|
||||||
using Content.Shared.Follower.Components;
|
|
||||||
using Robust.Shared.Maths;
|
|
||||||
using Robust.Shared.Serialization;
|
|
||||||
|
|
||||||
namespace Content.Shared.Follower;
|
namespace Content.Shared.Follower;
|
||||||
|
|
||||||
@@ -92,7 +88,7 @@ public sealed class FollowerSystem : EntitySystem
|
|||||||
public void StopFollowingEntity(EntityUid uid, EntityUid target,
|
public void StopFollowingEntity(EntityUid uid, EntityUid target,
|
||||||
FollowedComponent? followed=null)
|
FollowedComponent? followed=null)
|
||||||
{
|
{
|
||||||
if (!Resolve(target, ref followed))
|
if (!Resolve(target, ref followed, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!HasComp<FollowerComponent>(uid))
|
if (!HasComp<FollowerComponent>(uid))
|
||||||
|
|||||||
Reference in New Issue
Block a user