Anti-anomaly fixes (#24634)
- Remove unnecessary mapcoordinates get. - Remove mapping markers as everything should be ingame entities and this is functioning as an area.
This commit is contained in:
@@ -119,6 +119,8 @@ public sealed partial class AnomalySystem
|
||||
// don't spawn inside of solid objects
|
||||
var physQuery = GetEntityQuery<PhysicsComponent>();
|
||||
var valid = true;
|
||||
|
||||
// TODO: This should be using static lookup.
|
||||
foreach (var ent in gridComp.GetAnchoredEntities(tile))
|
||||
{
|
||||
if (!physQuery.TryGetComponent(ent, out var body))
|
||||
@@ -143,9 +145,9 @@ public sealed partial class AnomalySystem
|
||||
if (antiXform.MapID != mapPos.MapId)
|
||||
continue;
|
||||
|
||||
var antiCoordinates = _transform.GetMapCoordinates(antiXform);
|
||||
var antiCoordinates = _transform.GetWorldPosition(antiXform);
|
||||
|
||||
var delta = antiCoordinates.Position - mapPos.Position;
|
||||
var delta = antiCoordinates - mapPos.Position;
|
||||
if (delta.LengthSquared() < zone.ZoneRadius * zone.ZoneRadius)
|
||||
{
|
||||
valid = false;
|
||||
|
||||
Reference in New Issue
Block a user