diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs index bd199311ca..32c9f4c127 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/MeleeWeaponComponent.cs @@ -28,12 +28,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee [Dependency] private readonly IPhysicsManager _physicsManager; #pragma warning restore 649 - private int _damage = 1; - private float _range = 1; - private float _arcWidth = 90; + private int _damage; + private float _range; + private float _arcWidth; private string _arc; private string _hitSound; - private float _cooldownTime = 1f; + private float _cooldownTime; [ViewVariables(VVAccess.ReadWrite)] public string Arc @@ -122,9 +122,8 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee private HashSet ArcRayCast(Vector2 position, Angle angle, IEntity ignore) { - // Maybe make this increment count depend on the width/length? - const int increments = 5; var widthRad = Angle.FromDegrees(ArcWidth); + var increments = 1 + (35 * (int) Math.Ceiling(widthRad / (2 * Math.PI))); var increment = widthRad / increments; var baseAngle = angle - widthRad / 2; diff --git a/Resources/Prototypes/Entities/Items/Weapons/spear.yml b/Resources/Prototypes/Entities/Items/Weapons/spear.yml index b03cf7bba0..231b526832 100644 --- a/Resources/Prototypes/Entities/Items/Weapons/spear.yml +++ b/Resources/Prototypes/Entities/Items/Weapons/spear.yml @@ -13,7 +13,7 @@ - type: MeleeWeapon range: 1.5 - arcwidth: 10 + arcwidth: 0 arc: spear - type: Item