diff --git a/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs b/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs index 27e72eeddd..46a74c034a 100644 --- a/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs @@ -6,6 +6,7 @@ using Robust.Server.Interfaces.GameObjects; using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.GameObjects.Components; using Robust.Shared.Interfaces.Map; using Robust.Shared.Interfaces.Network; using Robust.Shared.Interfaces.Timing; @@ -53,6 +54,14 @@ namespace Content.Server.GameObjects.Components.Movement physComp.Mass = 1; } + if (!gridEntity.HasComponent()) + { + var collideComp = gridEntity.AddComponent(); + collideComp.CollisionEnabled = true; + collideComp.IsHardCollidable = true; + collideComp.PhysicsShapes.Add(new PhysShapeGrid(grid)); + } + physComp.LinearVelocity = CalcNewVelocity(direction, enabled) * WalkMoveSpeed; } } diff --git a/Content.Shared/Physics/CollisionGroup.cs b/Content.Shared/Physics/CollisionGroup.cs index a4e45c4cc2..58c0bddb5b 100644 --- a/Content.Shared/Physics/CollisionGroup.cs +++ b/Content.Shared/Physics/CollisionGroup.cs @@ -1,5 +1,6 @@ using System; using JetBrains.Annotations; +using Robust.Shared.Map; namespace Content.Shared.Physics { @@ -17,6 +18,8 @@ namespace Content.Shared.Physics SmallImpassable = 1 << 4, // 16 Things a smaller object - a cat, a crab - can't go through - a wall, but not a computer terminal or a table Clickable = 1 << 5, // 32 Temporary "dummy" layer to ensure that objects can still be clicked even if they don't collide with anything (you can't interact with objects that have no layer, including items) + MapGrid = MapGridHelpers.CollisionGroup, // Map grids, like shuttles. This is the actual grid itself, not the walls or other entities connected to the grid. + // 32 possible groups MobMask = Impassable | MobImpassable | VaultImpassable | SmallImpassable, AllMask = -1, diff --git a/RobustToolbox b/RobustToolbox index dadaa3fb8f..22bf1516cf 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit dadaa3fb8f10c9216b5d6a0aaf64f381d14e381c +Subproject commit 22bf1516cf6662e34144a88b3c9d89e476a18ecb