This commit is contained in:
Swept
2020-09-20 15:29:11 +00:00
committed by GitHub
parent 9c72008ece
commit 0ea8792501
22 changed files with 24 additions and 45 deletions

View File

@@ -29,8 +29,8 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
private TimeSpan _lastAttackTime;
private TimeSpan _cooldownEnd;
private string _hitSound;
private string _missSound;
private readonly string _hitSound;
private readonly string _missSound;
public float ArcCooldownTime { get; private set; } = 1f;
public float CooldownTime { get; private set; } = 0.5f;
@@ -191,7 +191,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
private HashSet<IEntity> ArcRayCast(Vector2 position, Angle angle, IEntity ignore)
{
var widthRad = Angle.FromDegrees(ArcWidth);
var increments = 1 + (35 * (int) Math.Ceiling(widthRad / (2 * Math.PI)));
var increments = 1 + 35 * (int) Math.Ceiling(widthRad / (2 * Math.PI));
var increment = widthRad / increments;
var baseAngle = angle - widthRad / 2;