Changes required for component tree engine PR (#13109)

This commit is contained in:
Leon Friedrich
2022-12-27 15:34:22 +13:00
committed by GitHub
parent c02fbc3659
commit 7c7c7d3206
8 changed files with 5 additions and 15 deletions

View File

@@ -29,6 +29,7 @@ public abstract class SharedDoorSystem : EntitySystem
[Dependency] protected readonly SharedAudioSystem Audio = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly OccluderSystem _occluder = default!;
/// <summary>
/// A body must have an intersection percentage larger than this in order to be considered as colliding with a
@@ -390,8 +391,8 @@ public abstract class SharedDoorSystem : EntitySystem
if (!collidable)
door.CurrentlyCrushing.Clear();
if (door.Occludes && Resolve(uid, ref occluder, false))
occluder.Enabled = collidable;
if (door.Occludes)
_occluder.SetEnabled(uid, collidable);
}
/// <summary>

View File

@@ -186,7 +186,8 @@ namespace Content.Shared.Examine
continue;
}
var bBox = o.BoundingBox.Translated(entMan.GetComponent<TransformComponent>(o.Owner).WorldPosition);
var bBox = o.BoundingBox;
bBox = bBox.Translated(entMan.GetComponent<TransformComponent>(o.Owner).WorldPosition);
if (bBox.Contains(origin.Position) || bBox.Contains(other.Position))
{