Removes SmallImpassable from melee swing collision mask (#3036)

* Alters melee swing collision mask.

* Part one...

* Part two.
This commit is contained in:
tmtmtl30
2021-02-04 03:13:13 -08:00
committed by GitHub
parent 82a97857ac
commit 735c6159d8

View File

@@ -6,6 +6,7 @@ using Content.Shared.Damage;
using Content.Shared.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Items;
using Content.Shared.Interfaces.GameObjects.Components;
using Content.Shared.Physics;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
@@ -203,7 +204,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
for (var i = 0; i < increments; i++)
{
var castAngle = new Angle(baseAngle + increment * i);
var res = _physicsManager.IntersectRay(mapId, new CollisionRay(position, castAngle.ToVec(), 23), Range, ignore).FirstOrDefault();
var res = _physicsManager.IntersectRay(mapId, new CollisionRay(position, castAngle.ToVec(), (int) (CollisionGroup.Impassable|CollisionGroup.MobImpassable)), Range, ignore).FirstOrDefault();
if (res.HitEntity != null)
{
resSet.Add(res.HitEntity);