Right now ShuttleControllers add the collision component to the Grid Entity.
Adds Grids to the collision group.
This commit is contained in:
@@ -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<ICollidableComponent>())
|
||||
{
|
||||
var collideComp = gridEntity.AddComponent<CollidableComponent>();
|
||||
collideComp.CollisionEnabled = true;
|
||||
collideComp.IsHardCollidable = true;
|
||||
collideComp.PhysicsShapes.Add(new PhysShapeGrid(grid));
|
||||
}
|
||||
|
||||
physComp.LinearVelocity = CalcNewVelocity(direction, enabled) * WalkMoveSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Submodule RobustToolbox updated: dadaa3fb8f...22bf1516cf
Reference in New Issue
Block a user