Removed Old PlayerSession Functions (#5404)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Acruid
2021-11-22 23:11:48 -08:00
committed by GitHub
parent 7910928679
commit 6e54e740c7
26 changed files with 97 additions and 94 deletions

View File

@@ -1,10 +1,13 @@
using System.Collections.Generic;
using System.Linq;
using Content.Server.AI.Components;
using Content.Shared.Damage;
using JetBrains.Annotations;
using Robust.Server.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Player;
namespace Content.Server.AI.WorldState.States.Mobs
{
@@ -22,8 +25,9 @@ namespace Content.Server.AI.WorldState.States.Mobs
return result;
}
var playerManager = IoCManager.Resolve<IPlayerManager>();
var nearbyPlayers = playerManager.GetPlayersInRange(Owner.Transform.Coordinates, (int) controller.VisionRadius);
var nearbyPlayers = Filter.Empty()
.AddInRange(Owner.Transform.MapPosition, controller.VisionRadius)
.Recipients;
foreach (var player in nearbyPlayers)
{