Fix some build warnings (#2226)

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-10-12 01:42:53 +11:00
committed by GitHub
parent b64cb24059
commit d769661692
11 changed files with 16 additions and 22 deletions

View File

@@ -29,8 +29,8 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
private TimeSpan _lastAttackTime;
private TimeSpan _cooldownEnd;
private readonly string _hitSound;
private readonly string _missSound;
private readonly string _hitSound = default!;
private readonly string _missSound = default!;
public float ArcCooldownTime { get; private set; } = 1f;
public float CooldownTime { get; private set; } = 0.5f;
@@ -93,7 +93,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
var entities = ArcRayCast(eventArgs.User.Transform.WorldPosition, angle, eventArgs.User);
var audioSystem = EntitySystem.Get<AudioSystem>();
if (entities.Count() != 0)
if (entities.Count != 0)
{
audioSystem.PlayFromEntity( _hitSound, entities.First());
}