Revert "Physics (#3452)"

This reverts commit 3e64fd56a1.
This commit is contained in:
Pieter-Jan Briers
2021-02-28 18:49:48 +01:00
parent eddec5fcce
commit 1eb0fbd8d0
211 changed files with 2560 additions and 2600 deletions

View File

@@ -1,6 +1,5 @@
using System;
using Content.Shared.GameObjects.Components.Weapons;
using Content.Shared.Physics;
using Content.Shared.Utility;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
@@ -32,17 +31,18 @@ namespace Content.Server.GameObjects.Components.Weapon
public static void FlashAreaHelper(IEntity source, float range, float duration, string sound = null)
{
foreach (var entity in source.EntityManager.GetEntitiesInRange(source.Transform.Coordinates, range))
foreach (var entity in IoCManager.Resolve<IEntityManager>().GetEntitiesInRange(source.Transform.Coordinates, range))
{
if (!entity.TryGetComponent(out FlashableComponent flashable) ||
!source.InRangeUnobstructed(entity, range, CollisionGroup.Opaque)) continue;
if (!source.InRangeUnobstructed(entity, range, popup: true))
continue;
flashable.Flash(duration);
if(entity.TryGetComponent(out FlashableComponent flashable))
flashable.Flash(duration);
}
if (!string.IsNullOrEmpty(sound))
{
EntitySystem.Get<AudioSystem>().PlayAtCoords(sound, source.Transform.Coordinates);
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<AudioSystem>().PlayAtCoords(sound, source.Transform.Coordinates);
}
}
}