Fix disconnecting discontinuing your adventures off into deep space (#2256)
* Fix stopping when disconnecting while weightless * Use extension
This commit is contained in:
@@ -76,7 +76,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PlayerDetached(PlayerDetachedSystemMessage ev)
|
private void PlayerDetached(PlayerDetachedSystemMessage ev)
|
||||||
{
|
{
|
||||||
if (ev.Entity.HasComponent<PlayerInputMoverComponent>())
|
if (ev.Entity.HasComponent<PlayerInputMoverComponent>())
|
||||||
{
|
{
|
||||||
@@ -84,7 +84,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ev.Entity.TryGetComponent(out IPhysicsComponent? physics) &&
|
if (ev.Entity.TryGetComponent(out IPhysicsComponent? physics) &&
|
||||||
physics.TryGetController(out MoverController controller))
|
physics.TryGetController(out MoverController controller) &&
|
||||||
|
!ev.Entity.IsWeightless())
|
||||||
{
|
{
|
||||||
controller.StopMoving();
|
controller.StopMoving();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Content.Shared.GameObjects.EntitySystems
|
|||||||
public abstract class SharedMoverSystem : EntitySystem
|
public abstract class SharedMoverSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||||
[Dependency] private readonly IPhysicsManager _physicsManager = default!;
|
[Dependency] protected readonly IPhysicsManager PhysicsManager = default!;
|
||||||
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
|
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
|
|||||||
Reference in New Issue
Block a user