Merge pull request #906 from Clyybber/fix#673
This commit is contained in:
@@ -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<IEntity> 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;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
- type: MeleeWeapon
|
||||
range: 1.5
|
||||
arcwidth: 10
|
||||
arcwidth: 0
|
||||
arc: spear
|
||||
|
||||
- type: Item
|
||||
|
||||
Reference in New Issue
Block a user