Replace obsolete FromMap calls with ToCoordinates (#35304)

This commit is contained in:
Kyle Tyo
2025-03-01 13:53:30 +00:00
committed by deltanedas
parent 80fae66ae7
commit 5d2ef861e0
8 changed files with 20 additions and 17 deletions
@@ -14,6 +14,7 @@ using Content.Shared.GameTicking;
using Content.Shared.Inventory;
using Content.Shared.Projectiles;
using Content.Shared.Throwing;
using Robust.Server.GameObjects;
using Robust.Server.GameStates;
using Robust.Server.Player;
using Robust.Shared.Audio.Systems;
@@ -36,6 +37,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly MapSystem _mapSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly NodeGroupSystem _nodeGroupSystem = default!;
@@ -352,7 +354,7 @@ public sealed partial class ExplosionSystem : SharedExplosionSystem
CameraShake(iterationIntensity.Count * 4f, pos, queued.TotalIntensity);
//For whatever bloody reason, sound system requires ENTITY coordinates.
var mapEntityCoords = EntityCoordinates.FromMap(_mapManager.GetMapEntityId(pos.MapId), pos, _transformSystem, EntityManager);
var mapEntityCoords = _transformSystem.ToCoordinates(_mapSystem.GetMap(pos.MapId), pos);
// play sound.
// for the normal audio, we want everyone in pvs range