From 4c08e66254d6ea265316b777b39e977ead044520 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 25 Apr 2020 14:43:41 +0200 Subject: [PATCH] Fix thrown items not colliding with walls. --- Content.Server/Throw/ThrowHelper.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Content.Server/Throw/ThrowHelper.cs b/Content.Server/Throw/ThrowHelper.cs index 417e3143b7..0e402da225 100644 --- a/Content.Server/Throw/ThrowHelper.cs +++ b/Content.Server/Throw/ThrowHelper.cs @@ -21,8 +21,6 @@ namespace Content.Server.Throw { public static void Throw(IEntity thrownEnt, float throwForce, GridCoordinates targetLoc, GridCoordinates sourceLoc, bool spread = false, IEntity throwSourceEnt = null) { - - if (!thrownEnt.TryGetComponent(out CollidableComponent colComp)) return; @@ -38,7 +36,7 @@ namespace Content.Server.Throw if (colComp.PhysicsShapes.Count == 0) colComp.PhysicsShapes.Add(new PhysShapeAabb()); - colComp.PhysicsShapes[0].CollisionMask |= (int) CollisionGroup.MobImpassable; + colComp.PhysicsShapes[0].CollisionMask |= (int) (CollisionGroup.MobImpassable | CollisionGroup.Impassable); colComp.IsScrapingFloor = false; } var angle = new Angle(targetLoc.ToMapPos(mapManager) - sourceLoc.ToMapPos(mapManager));