Removes SmallImpassable from melee swing collision mask (#3036)
* Alters melee swing collision mask. * Part one... * Part two.
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.GameObjects.Components.Damage;
|
using Content.Shared.GameObjects.Components.Damage;
|
||||||
using Content.Shared.GameObjects.Components.Items;
|
using Content.Shared.GameObjects.Components.Items;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
|
using Content.Shared.Physics;
|
||||||
using Robust.Server.GameObjects.EntitySystems;
|
using Robust.Server.GameObjects.EntitySystems;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.GameObjects.Systems;
|
using Robust.Shared.GameObjects.Systems;
|
||||||
@@ -203,7 +204,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
for (var i = 0; i < increments; i++)
|
for (var i = 0; i < increments; i++)
|
||||||
{
|
{
|
||||||
var castAngle = new Angle(baseAngle + increment * 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)
|
if (res.HitEntity != null)
|
||||||
{
|
{
|
||||||
resSet.Add(res.HitEntity);
|
resSet.Add(res.HitEntity);
|
||||||
|
|||||||
Reference in New Issue
Block a user