Fixes soap and banana peels going through walls when thrown.

This commit is contained in:
Vera Aguilera Puerto
2021-03-15 21:29:03 +01:00
parent e7052566a4
commit 0531dcb197
5 changed files with 23 additions and 12 deletions

View File

@@ -123,6 +123,8 @@ namespace Content.Server.GameObjects.Components.Atmos
tile.HotspotExpose(700, 50, true);
var physics = Owner.GetComponent<IPhysBody>();
foreach (var uid in _collided.ToArray())
{
if (!uid.IsValid() || !Owner.EntityManager.EntityExists(uid))
@@ -132,7 +134,6 @@ namespace Content.Server.GameObjects.Components.Atmos
}
var entity = Owner.EntityManager.GetEntity(uid);
var physics = Owner.GetComponent<IPhysBody>();
var otherPhysics = entity.GetComponent<IPhysBody>();
if (!physics.GetWorldAABB().Intersects(otherPhysics.GetWorldAABB()))