Fix gib pulling player back from ghost (#3664)
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.GameObjects.Components.Mobs;
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
|
using Content.Server.GameObjects.Components.Observer;
|
||||||
using Content.Server.Mobs.Roles;
|
using Content.Server.Mobs.Roles;
|
||||||
using Content.Server.Objectives;
|
using Content.Server.Objectives;
|
||||||
using Content.Server.Players;
|
using Content.Server.Players;
|
||||||
@@ -225,13 +226,14 @@ namespace Content.Server.Mobs
|
|||||||
OwnedComponent = component;
|
OwnedComponent = component;
|
||||||
OwnedComponent?.InternalAssignMind(this);
|
OwnedComponent?.InternalAssignMind(this);
|
||||||
|
|
||||||
|
if (VisitingEntity?.HasComponent<GhostComponent>() == false)
|
||||||
|
VisitingEntity = null;
|
||||||
|
|
||||||
// Player is CURRENTLY connected.
|
// Player is CURRENTLY connected.
|
||||||
if (Session != null && !alreadyAttached)
|
if (Session != null && !alreadyAttached && VisitingEntity == null)
|
||||||
{
|
{
|
||||||
Session.AttachToEntity(entity);
|
Session.AttachToEntity(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
VisitingEntity = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveOwningPlayer()
|
public void RemoveOwningPlayer()
|
||||||
|
|||||||
Reference in New Issue
Block a user