From bb781f49759faffc7e4f3d1e8b65c3267d732982 Mon Sep 17 00:00:00 2001 From: ancientpower Date: Sat, 15 Aug 2020 13:34:25 -0500 Subject: [PATCH] fixes ghosts not having a collidable component and adds a ghost collision flag (#1675) Co-authored-by: ancientpower --- Content.Shared/Physics/CollisionGroup.cs | 1 + Resources/Prototypes/Entities/Mobs/Player/observer.yml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Content.Shared/Physics/CollisionGroup.cs b/Content.Shared/Physics/CollisionGroup.cs index 8ef86b5a6f..0834d69787 100644 --- a/Content.Shared/Physics/CollisionGroup.cs +++ b/Content.Shared/Physics/CollisionGroup.cs @@ -20,6 +20,7 @@ namespace Content.Shared.Physics VaultImpassable = 1 << 3, // 8 Things that cannot be jumped over, not half walls or tables 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) + GhostImpassable = 1 << 6, // 64 Things impassible by ghosts/observers, ie blessed tiles or forcefields MapGrid = MapGridHelpers.CollisionGroup, // Map grids, like shuttles. This is the actual grid itself, not the walls or other entities connected to the grid. diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index eba5ba58d4..4b6fea353d 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -7,6 +7,12 @@ - type: Mind - type: Physics mass: 5 + - type: Collidable + shapes: + - !type:PhysShapeAabb + bounds: "-0.35,-0.35,0.35,0.35" + mask: + - GhostImpassable - type: Eye zoom: 0.5, 0.5 drawFov: false