Replace obsolete FromMap calls with ToCoordinates (#35304)
This commit is contained in:
@@ -16,6 +16,7 @@ public sealed class TetherGunSystem : SharedTetherGunSystem
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlay = default!;
|
||||
[Dependency] private readonly IPlayerManager _player = default!;
|
||||
[Dependency] private readonly MapSystem _mapSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -73,11 +74,11 @@ public sealed class TetherGunSystem : SharedTetherGunSystem
|
||||
|
||||
if (_mapManager.TryFindGridAt(mouseWorldPos, out var gridUid, out _))
|
||||
{
|
||||
coords = EntityCoordinates.FromMap(gridUid, mouseWorldPos, TransformSystem);
|
||||
coords = TransformSystem.ToCoordinates(gridUid, mouseWorldPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
coords = EntityCoordinates.FromMap(_mapManager.GetMapEntityId(mouseWorldPos.MapId), mouseWorldPos, TransformSystem);
|
||||
coords = TransformSystem.ToCoordinates(_mapSystem.GetMap(mouseWorldPos.MapId), mouseWorldPos);
|
||||
}
|
||||
|
||||
const float BufferDistance = 0.1f;
|
||||
|
||||
Reference in New Issue
Block a user