]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
make shields be able to block doorways (#16079)
authorSlava0135 <40753025+Slava0135@users.noreply.github.com>
Fri, 5 May 2023 15:14:32 +0000 (18:14 +0300)
committerGitHub <noreply@github.com>
Fri, 5 May 2023 15:14:32 +0000 (11:14 -0400)
* you can block doors
(doors now consider static fixtures)

* this was unnecessary

Content.Shared/Blocking/BlockingSystem.cs
Content.Shared/Doors/Systems/SharedDoorSystem.cs

index 8b1f9b38b7e8b3f4759a992b005732765ef4f219..d74e93468053fc72effbf1a2b54c09272cf27f4b 100644 (file)
@@ -152,18 +152,15 @@ public sealed partial class BlockingSystem : EntitySystem
                 return false;
             }
 
-            //Don't allow someone to block if someone else is on the same tile or if they're inside of a doorway
+            //Don't allow someone to block if someone else is on the same tile
             var playerTileRef = xform.Coordinates.GetTileRef();
             if (playerTileRef != null)
             {
                 var intersecting = _lookup.GetEntitiesIntersecting(playerTileRef.Value);
                 var mobQuery = GetEntityQuery<MobStateComponent>();
-                var doorQuery = GetEntityQuery<DoorComponent>();
-                var xformQuery = GetEntityQuery<TransformComponent>();
-
                 foreach (var uid in intersecting)
                 {
-                    if (uid != user && mobQuery.HasComponent(uid) || xformQuery.GetComponent(uid).Anchored && doorQuery.HasComponent(uid))
+                    if (uid != user && mobQuery.HasComponent(uid))
                     {
                         TooCloseError(user);
                         return false;
index c105f69120e98343dc2f07e062313957379350e4..cf52ee5e3e39596df17a2260d4d963ca432bdced 100644 (file)
@@ -442,8 +442,7 @@ public abstract class SharedDoorSystem : EntitySystem
             if (!otherPhysics.CanCollide)
                 continue;
 
-            if (otherPhysics.BodyType == BodyType.Static || (physics.CollisionMask & otherPhysics.CollisionLayer) == 0
-                && (otherPhysics.CollisionMask & physics.CollisionLayer) == 0)
+            if ((physics.CollisionMask & otherPhysics.CollisionLayer) == 0 && (otherPhysics.CollisionMask & physics.CollisionLayer) == 0)
                 continue;
 
             if (_entityLookup.GetWorldAABB(otherPhysics.Owner).IntersectPercentage(doorAABB) < IntersectPercentage)