Small adjustment for elookup api (#22447)
* Small adjustment for elookup api * fix
This commit is contained in:
@@ -140,7 +140,10 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
tile.PressureSpecificTarget = curTile;
|
||||
}
|
||||
|
||||
foreach (var entity in _lookup.GetEntitiesIntersecting(tile.GridIndex, tile.GridIndices, 0f))
|
||||
_entSet.Clear();
|
||||
_lookup.GetLocalEntitiesIntersecting(tile.GridIndex, tile.GridIndices, _entSet, 0f);
|
||||
|
||||
foreach (var entity in _entSet)
|
||||
{
|
||||
// Ideally containers would have their own EntityQuery internally or something given recursively it may need to slam GetComp<T> anyway.
|
||||
// Also, don't care about static bodies (but also due to collisionwakestate can't query dynamic directly atm).
|
||||
|
||||
@@ -165,8 +165,10 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
}
|
||||
|
||||
var fireEvent = new TileFireEvent(tile.Hotspot.Temperature, tile.Hotspot.Volume);
|
||||
_entSet.Clear();
|
||||
_lookup.GetLocalEntitiesIntersecting(tile.GridIndex, tile.GridIndices, _entSet, 0f);
|
||||
|
||||
foreach (var entity in _lookup.GetEntitiesIntersecting(tile.GridIndex, tile.GridIndices, 0f))
|
||||
foreach (var entity in _entSet)
|
||||
{
|
||||
RaiseLocalEvent(entity, ref fireEvent);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ public sealed partial class AtmosphereSystem : SharedAtmosphereSystem
|
||||
private const float ExposedUpdateDelay = 1f;
|
||||
private float _exposedTimer = 0f;
|
||||
|
||||
private HashSet<EntityUid> _entSet = new();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
Reference in New Issue
Block a user