From 98c158d2b795faca6c7f2ec013721bc0bd27cb94 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sun, 11 Apr 2021 21:46:15 +0200 Subject: [PATCH] Fix melee weapon arcs being rotated incorrectly. --- .../Components/Weapon/Melee/MeleeWeaponComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs index e16cf9c42d..917d3d30f4 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs @@ -86,7 +86,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee // This should really be improved. GetEntitiesInArc uses pos instead of bounding boxes. var entities = ArcRayCast(eventArgs.User.Transform.WorldPosition, angle, eventArgs.User); - + if (entities.Count != 0) { SoundSystem.Play(Filter.Pvs(Owner), _hitSound, entities.First()); @@ -190,7 +190,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee { var castAngle = new Angle(baseAngle + increment * i); var res = EntitySystem.Get().IntersectRay(mapId, - new CollisionRay(position, castAngle.ToVec(), + new CollisionRay(position, castAngle.ToWorldVec(), (int) (CollisionGroup.Impassable | CollisionGroup.MobImpassable)), Range, ignore).ToList(); if (res.Count != 0)