Update content vectors to numerics (#17759)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Explosion;
|
||||
using Robust.Shared.Map;
|
||||
@@ -272,7 +273,7 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
|
||||
// First attempt to find a grid that is relatively close to the explosion's center. Instead of looking in a
|
||||
// diameter x diameter sized box, use a smaller box with radius sized sides:
|
||||
var box = Box2.CenteredAround(epicenter.Position, (radius, radius));
|
||||
var box = Box2.CenteredAround(epicenter.Position, new Vector2(radius, radius));
|
||||
|
||||
foreach (var grid in _mapManager.FindGridsIntersecting(epicenter.MapId, box))
|
||||
{
|
||||
@@ -293,7 +294,7 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
// and using that for the grid look-up, we will just arbitrarily fudge the lookup size to be twice the diameter.
|
||||
|
||||
radius *= 4;
|
||||
box = Box2.CenteredAround(epicenter.Position, (radius, radius));
|
||||
box = Box2.CenteredAround(epicenter.Position, new Vector2(radius, radius));
|
||||
var mapGrids = _mapManager.FindGridsIntersecting(epicenter.MapId, box).ToList();
|
||||
var grids = mapGrids.Select(x => x.Owner).ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user