Melee refactor (#10897)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.Weapons.Melee.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class MeleeLungeComponent : Component
|
||||
{
|
||||
private const float ResetTime = 0.3f;
|
||||
private const float BaseOffset = 0.25f;
|
||||
|
||||
private Angle _angle;
|
||||
private float _time;
|
||||
|
||||
public void SetData(Angle angle)
|
||||
{
|
||||
_angle = angle;
|
||||
_time = 0;
|
||||
}
|
||||
|
||||
public void Update(float frameTime)
|
||||
{
|
||||
_time += frameTime;
|
||||
|
||||
var offset = Vector2.Zero;
|
||||
var deleteSelf = false;
|
||||
|
||||
if (_time > ResetTime)
|
||||
{
|
||||
deleteSelf = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = _angle.RotateVec((0, -BaseOffset));
|
||||
offset *= (ResetTime - _time) / ResetTime;
|
||||
}
|
||||
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (entMan.TryGetComponent(Owner, out ISpriteComponent? spriteComponent))
|
||||
{
|
||||
spriteComponent.Offset = offset;
|
||||
}
|
||||
|
||||
if (deleteSelf)
|
||||
{
|
||||
entMan.RemoveComponent<MeleeLungeComponent>(Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.Weapons.Melee.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class MeleeWeaponArcAnimationComponent : Component
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
private MeleeWeaponAnimationPrototype? _meleeWeaponAnimation;
|
||||
|
||||
private float _timer;
|
||||
private SpriteComponent? _sprite;
|
||||
private Angle _baseAngle;
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_sprite = _entMan.GetComponent<SpriteComponent>(Owner);
|
||||
}
|
||||
|
||||
public void SetData(MeleeWeaponAnimationPrototype prototype, Angle baseAngle, EntityUid attacker, bool followAttacker = true)
|
||||
{
|
||||
_meleeWeaponAnimation = prototype;
|
||||
_sprite?.AddLayer(new RSI.StateId(prototype.State));
|
||||
_baseAngle = baseAngle;
|
||||
if(followAttacker)
|
||||
_entMan.GetComponent<TransformComponent>(Owner).AttachParent(attacker);
|
||||
}
|
||||
|
||||
internal void Update(float frameTime)
|
||||
{
|
||||
if (_meleeWeaponAnimation == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_timer += frameTime;
|
||||
|
||||
var (r, g, b, a) =
|
||||
Vector4.Clamp(_meleeWeaponAnimation.Color + _meleeWeaponAnimation.ColorDelta * _timer, Vector4.Zero, Vector4.One);
|
||||
|
||||
if (_sprite != null)
|
||||
{
|
||||
_sprite.Color = new Color(r, g, b, a);
|
||||
}
|
||||
|
||||
var transform = _entMan.GetComponent<TransformComponent>(Owner);
|
||||
|
||||
switch (_meleeWeaponAnimation.ArcType)
|
||||
{
|
||||
case WeaponArcType.Slash:
|
||||
var angle = Angle.FromDegrees(_meleeWeaponAnimation.Width)/2;
|
||||
transform.WorldRotation = _baseAngle + Angle.Lerp(-angle, angle, (float) (_timer / _meleeWeaponAnimation.Length.TotalSeconds));
|
||||
break;
|
||||
|
||||
case WeaponArcType.Poke:
|
||||
transform.WorldRotation = _baseAngle;
|
||||
|
||||
if (_sprite != null)
|
||||
{
|
||||
_sprite.Offset -= (0, _meleeWeaponAnimation.Speed * frameTime);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (_meleeWeaponAnimation.Length.TotalSeconds <= _timer)
|
||||
{
|
||||
_entMan.DeleteEntity(Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace Content.Client.Weapons.Melee.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Used for melee attack animations. Typically just has a fadeout.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class WeaponArcVisualsComponent : Component
|
||||
{
|
||||
[ViewVariables, DataField("animation")]
|
||||
public WeaponArcAnimation Animation = WeaponArcAnimation.None;
|
||||
}
|
||||
|
||||
public enum WeaponArcAnimation : byte
|
||||
{
|
||||
None,
|
||||
Thrust,
|
||||
Slash,
|
||||
}
|
||||
75
Content.Client/Weapons/Melee/MeleeArcOverlay.cs
Normal file
75
Content.Client/Weapons/Melee/MeleeArcOverlay.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using Content.Shared.CombatMode;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.Weapons.Melee;
|
||||
|
||||
/// <summary>
|
||||
/// Debug overlay showing the arc and range of a melee weapon.
|
||||
/// </summary>
|
||||
public sealed class MeleeArcOverlay : Overlay
|
||||
{
|
||||
private readonly IEntityManager _entManager;
|
||||
private readonly IEyeManager _eyeManager;
|
||||
private readonly IInputManager _inputManager;
|
||||
private readonly IPlayerManager _playerManager;
|
||||
private readonly MeleeWeaponSystem _melee;
|
||||
private readonly SharedCombatModeSystem _combatMode;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
||||
|
||||
public MeleeArcOverlay(IEntityManager entManager, IEyeManager eyeManager, IInputManager inputManager, IPlayerManager playerManager, MeleeWeaponSystem melee, SharedCombatModeSystem combatMode)
|
||||
{
|
||||
_entManager = entManager;
|
||||
_eyeManager = eyeManager;
|
||||
_inputManager = inputManager;
|
||||
_playerManager = playerManager;
|
||||
_melee = melee;
|
||||
_combatMode = combatMode;
|
||||
}
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
var player = _playerManager.LocalPlayer?.ControlledEntity;
|
||||
|
||||
if (!_entManager.TryGetComponent<TransformComponent>(player, out var xform) ||
|
||||
!_combatMode.IsInCombatMode(player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var weapon = _melee.GetWeapon(player.Value);
|
||||
|
||||
if (weapon == null)
|
||||
return;
|
||||
|
||||
var mousePos = _inputManager.MouseScreenPosition;
|
||||
var mapPos = _eyeManager.ScreenToMap(mousePos);
|
||||
|
||||
if (mapPos.MapId != args.MapId)
|
||||
return;
|
||||
|
||||
var playerPos = xform.MapPosition;
|
||||
|
||||
if (mapPos.MapId != playerPos.MapId)
|
||||
return;
|
||||
|
||||
var diff = mapPos.Position - playerPos.Position;
|
||||
|
||||
if (diff.Equals(Vector2.Zero))
|
||||
return;
|
||||
|
||||
diff = diff.Normalized * Math.Min(weapon.Range, diff.Length);
|
||||
args.WorldHandle.DrawLine(playerPos.Position, playerPos.Position + diff, Color.Aqua);
|
||||
|
||||
if (weapon.Angle.Theta == 0)
|
||||
return;
|
||||
|
||||
args.WorldHandle.DrawLine(playerPos.Position, playerPos.Position + new Angle(-weapon.Angle / 2).RotateVec(diff), Color.Orange);
|
||||
args.WorldHandle.DrawLine(playerPos.Position, playerPos.Position + new Angle(weapon.Angle / 2).RotateVec(diff), Color.Orange);
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using Content.Client.Weapons.Melee.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Client.Weapons.Melee
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class MeleeLungeSystem : EntitySystem
|
||||
{
|
||||
public override void FrameUpdate(float frameTime)
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var meleeLungeComponent in EntityManager.EntityQuery<MeleeLungeComponent>(true))
|
||||
{
|
||||
meleeLungeComponent.Update(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Content.Client/Weapons/Melee/MeleeSpreadCommand.cs
Normal file
40
Content.Client/Weapons/Melee/MeleeSpreadCommand.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Content.Shared.CombatMode;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.Weapons.Melee;
|
||||
|
||||
|
||||
public sealed class MeleeSpreadCommand : IConsoleCommand
|
||||
{
|
||||
public string Command => "showmeleespread";
|
||||
public string Description => "Shows the current weapon's range and arc for debugging";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
var collection = IoCManager.Instance;
|
||||
|
||||
if (collection == null)
|
||||
return;
|
||||
|
||||
var overlayManager = collection.Resolve<IOverlayManager>();
|
||||
|
||||
if (overlayManager.RemoveOverlay<MeleeArcOverlay>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var sysManager = collection.Resolve<IEntitySystemManager>();
|
||||
|
||||
overlayManager.AddOverlay(new MeleeArcOverlay(
|
||||
collection.Resolve<IEntityManager>(),
|
||||
collection.Resolve<IEyeManager>(),
|
||||
collection.Resolve<IInputManager>(),
|
||||
collection.Resolve<IPlayerManager>(),
|
||||
sysManager.GetEntitySystem<MeleeWeaponSystem>(),
|
||||
sysManager.GetEntitySystem<SharedCombatModeSystem>()));
|
||||
}
|
||||
}
|
||||
@@ -2,31 +2,17 @@ using Content.Shared.Weapons;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Client.Animations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Animations;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.Weapons.Melee;
|
||||
|
||||
public sealed partial class MeleeWeaponSystem
|
||||
{
|
||||
private static readonly Animation DefaultDamageAnimation = new()
|
||||
{
|
||||
Length = TimeSpan.FromSeconds(DamageAnimationLength),
|
||||
AnimationTracks =
|
||||
{
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Color),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(Color.Red, 0f),
|
||||
new AnimationTrackProperty.KeyFrame(Color.White, DamageAnimationLength)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private const float DamageAnimationLength = 0.15f;
|
||||
/// <summary>
|
||||
/// It's a little on the long side but given we use multiple colours denoting what happened it makes it easier to register.
|
||||
/// </summary>
|
||||
private const float DamageAnimationLength = 0.30f;
|
||||
private const string DamageAnimationKey = "damage-effect";
|
||||
|
||||
private void InitializeEffect()
|
||||
@@ -47,27 +33,25 @@ public sealed partial class MeleeWeaponSystem
|
||||
/// <summary>
|
||||
/// Gets the red effect animation whenever the server confirms something is hit
|
||||
/// </summary>
|
||||
public Animation? GetDamageAnimation(EntityUid uid, SpriteComponent? sprite = null)
|
||||
private Animation? GetDamageAnimation(EntityUid uid, Color color, SpriteComponent? sprite = null)
|
||||
{
|
||||
if (!Resolve(uid, ref sprite, false))
|
||||
return null;
|
||||
|
||||
// 90% of them are going to be this so why allocate a new class.
|
||||
if (sprite.Color.Equals(Color.White))
|
||||
return DefaultDamageAnimation;
|
||||
|
||||
return new Animation
|
||||
{
|
||||
Length = TimeSpan.FromSeconds(DamageAnimationLength),
|
||||
AnimationTracks =
|
||||
{
|
||||
new AnimationTrackComponentProperty()
|
||||
new AnimationTrackComponentProperty
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Color),
|
||||
InterpolationMode = AnimationInterpolationMode.Linear,
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(Color.Red * sprite.Color, 0f),
|
||||
new AnimationTrackProperty.KeyFrame(color * sprite.Color, 0f),
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color, DamageAnimationLength)
|
||||
}
|
||||
}
|
||||
@@ -77,36 +61,44 @@ public sealed partial class MeleeWeaponSystem
|
||||
|
||||
private void OnDamageEffect(DamageEffectEvent ev)
|
||||
{
|
||||
if (Deleted(ev.Entity))
|
||||
return;
|
||||
var color = ev.Color;
|
||||
|
||||
var player = EnsureComp<AnimationPlayerComponent>(ev.Entity);
|
||||
|
||||
// Need to stop the existing animation first to ensure the sprite color is fixed.
|
||||
// Otherwise we might lerp to a red colour instead.
|
||||
if (_animation.HasRunningAnimation(ev.Entity, player, DamageAnimationKey))
|
||||
foreach (var ent in ev.Entities)
|
||||
{
|
||||
_animation.Stop(ev.Entity, player, DamageAnimationKey);
|
||||
if (Deleted(ent))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var player = EnsureComp<AnimationPlayerComponent>(ent);
|
||||
player.NetSyncEnabled = false;
|
||||
|
||||
// Need to stop the existing animation first to ensure the sprite color is fixed.
|
||||
// Otherwise we might lerp to a red colour instead.
|
||||
if (_animation.HasRunningAnimation(ent, player, DamageAnimationKey))
|
||||
{
|
||||
_animation.Stop(ent, player, DamageAnimationKey);
|
||||
}
|
||||
|
||||
if (!TryComp<SpriteComponent>(ent, out var sprite))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TryComp<DamageEffectComponent>(ent, out var effect))
|
||||
{
|
||||
sprite.Color = effect.Color;
|
||||
}
|
||||
|
||||
var animation = GetDamageAnimation(ent, color, sprite);
|
||||
|
||||
if (animation == null)
|
||||
continue;
|
||||
|
||||
var comp = EnsureComp<DamageEffectComponent>(ent);
|
||||
comp.NetSyncEnabled = false;
|
||||
comp.Color = sprite.Color;
|
||||
_animation.Play(player, animation, DamageAnimationKey);
|
||||
}
|
||||
|
||||
if (!TryComp<SpriteComponent>(ev.Entity, out var sprite))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (TryComp<DamageEffectComponent>(ev.Entity, out var effect))
|
||||
{
|
||||
sprite.Color = effect.Color;
|
||||
}
|
||||
|
||||
var animation = GetDamageAnimation(ev.Entity, sprite);
|
||||
|
||||
if (animation == null)
|
||||
return;
|
||||
|
||||
var comp = EnsureComp<DamageEffectComponent>(ev.Entity);
|
||||
comp.NetSyncEnabled = false;
|
||||
comp.Color = sprite.Color;
|
||||
_animation.Play(player, DefaultDamageAnimation, DamageAnimationKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,133 +1,416 @@
|
||||
using System;
|
||||
using Content.Client.CombatMode;
|
||||
using Content.Client.Gameplay;
|
||||
using Content.Client.Hands;
|
||||
using Content.Client.Weapons.Melee.Components;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using JetBrains.Annotations;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Robust.Client.Animations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.State;
|
||||
using Robust.Shared.Animations;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
using static Content.Shared.Weapons.Melee.MeleeWeaponSystemMessages;
|
||||
|
||||
namespace Content.Client.Weapons.Melee
|
||||
namespace Content.Client.Weapons.Melee;
|
||||
|
||||
public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
{
|
||||
public sealed partial class MeleeWeaponSystem : EntitySystem
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly IOverlayManager _overlayManager = default!;
|
||||
[Dependency] private readonly IPlayerManager _player = default!;
|
||||
[Dependency] private readonly IPrototypeManager _protoManager = default!;
|
||||
[Dependency] private readonly IResourceCache _cache = default!;
|
||||
[Dependency] private readonly IStateManager _stateManager = default!;
|
||||
[Dependency] private readonly AnimationPlayerSystem _animation = default!;
|
||||
[Dependency] private readonly InputSystem _inputSystem = default!;
|
||||
|
||||
private const string MeleeLungeKey = "melee-lunge";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly AnimationPlayerSystem _animation = default!;
|
||||
[Dependency] private readonly EffectSystem _effectSystem = default!;
|
||||
base.Initialize();
|
||||
InitializeEffect();
|
||||
_overlayManager.AddOverlay(new MeleeWindupOverlay(EntityManager, _timing, _protoManager, _cache));
|
||||
SubscribeNetworkEvent<DamageEffectEvent>(OnDamageEffect);
|
||||
SubscribeNetworkEvent<MeleeLungeEvent>(OnMeleeLunge);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
public override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
_overlayManager.RemoveOverlay<MeleeWindupOverlay>();
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
if (!Timing.IsFirstTimePredicted)
|
||||
return;
|
||||
|
||||
var entityNull = _player.LocalPlayer?.ControlledEntity;
|
||||
|
||||
if (entityNull == null)
|
||||
return;
|
||||
|
||||
var entity = entityNull.Value;
|
||||
var weapon = GetWeapon(entity);
|
||||
|
||||
if (weapon == null)
|
||||
return;
|
||||
|
||||
if (!CombatMode.IsInCombatMode(entity) || !Blocker.CanAttack(entity))
|
||||
{
|
||||
InitializeEffect();
|
||||
SubscribeNetworkEvent<PlayMeleeWeaponAnimationMessage>(PlayWeaponArc);
|
||||
SubscribeNetworkEvent<PlayLungeAnimationMessage>(PlayLunge);
|
||||
SubscribeNetworkEvent<DamageEffectEvent>(OnDamageEffect);
|
||||
}
|
||||
|
||||
public override void FrameUpdate(float frameTime)
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var arcAnimationComponent in EntityManager.EntityQuery<MeleeWeaponArcAnimationComponent>(true))
|
||||
weapon.Attacking = false;
|
||||
if (weapon.WindUpStart != null)
|
||||
{
|
||||
arcAnimationComponent.Update(frameTime);
|
||||
EntityManager.RaisePredictiveEvent(new StopHeavyAttackEvent(weapon.Owner));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private void PlayWeaponArc(PlayMeleeWeaponAnimationMessage msg)
|
||||
var useDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use);
|
||||
var altDown = _inputSystem.CmdStates.GetState(EngineKeyFunctions.AltUse);
|
||||
var currentTime = Timing.CurTime;
|
||||
|
||||
// Heavy attack.
|
||||
if (altDown == BoundKeyState.Down)
|
||||
{
|
||||
if (!_prototypeManager.TryIndex(msg.ArcPrototype, out MeleeWeaponAnimationPrototype? weaponArc))
|
||||
// We did the click to end the attack but haven't pulled the key up.
|
||||
if (weapon.Attacking)
|
||||
{
|
||||
Logger.Error("Tried to play unknown weapon arc prototype '{0}'", msg.ArcPrototype);
|
||||
return;
|
||||
}
|
||||
|
||||
var attacker = msg.Attacker;
|
||||
if (!EntityManager.EntityExists(msg.Attacker))
|
||||
// If it's an unarmed attack then do a disarm
|
||||
if (weapon.Owner == entity)
|
||||
{
|
||||
// FIXME: This should never happen.
|
||||
Logger.Error($"Tried to play a weapon arc {msg.ArcPrototype}, but the attacker does not exist. attacker={msg.Attacker}, source={msg.Source}");
|
||||
EntityUid? target = null;
|
||||
|
||||
var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition);
|
||||
EntityCoordinates coordinates;
|
||||
|
||||
if (MapManager.TryFindGridAt(mousePos, out var grid))
|
||||
{
|
||||
coordinates = EntityCoordinates.FromMap(grid.GridEntityId, mousePos, EntityManager);
|
||||
}
|
||||
else
|
||||
{
|
||||
coordinates = EntityCoordinates.FromMap(MapManager.GetMapEntityId(mousePos.MapId), mousePos, EntityManager);
|
||||
}
|
||||
|
||||
if (_stateManager.CurrentState is GameplayStateBase screen)
|
||||
{
|
||||
target = screen.GetEntityUnderPosition(mousePos);
|
||||
}
|
||||
|
||||
EntityManager.RaisePredictiveEvent(new DisarmAttackEvent(target, coordinates));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Deleted(attacker))
|
||||
// Otherwise do heavy attack if it's a weapon.
|
||||
|
||||
// Start a windup
|
||||
if (weapon.WindUpStart == null)
|
||||
{
|
||||
var lunge = attacker.EnsureComponent<MeleeLungeComponent>();
|
||||
lunge.SetData(msg.Angle);
|
||||
|
||||
var entity = EntityManager.SpawnEntity(weaponArc.Prototype, EntityManager.GetComponent<TransformComponent>(attacker).Coordinates);
|
||||
EntityManager.GetComponent<TransformComponent>(entity).LocalRotation = msg.Angle;
|
||||
|
||||
var weaponArcAnimation = EntityManager.GetComponent<MeleeWeaponArcAnimationComponent>(entity);
|
||||
weaponArcAnimation.SetData(weaponArc, msg.Angle, attacker, msg.ArcFollowAttacker);
|
||||
|
||||
// Due to ISpriteComponent limitations, weapons that don't use an RSI won't have this effect.
|
||||
if (EntityManager.EntityExists(msg.Source) &&
|
||||
msg.TextureEffect &&
|
||||
EntityManager.TryGetComponent(msg.Source, out ISpriteComponent? sourceSprite) &&
|
||||
sourceSprite.BaseRSI?.Path is { } path)
|
||||
{
|
||||
var curTime = _gameTiming.CurTime;
|
||||
var effect = new EffectSystemMessage
|
||||
{
|
||||
EffectSprite = path.ToString(),
|
||||
RsiState = sourceSprite.LayerGetState(0).Name,
|
||||
Coordinates = EntityManager.GetComponent<TransformComponent>(attacker).Coordinates,
|
||||
Color = Vector4.Multiply(new Vector4(255, 255, 255, 125), 1.0f),
|
||||
ColorDelta = Vector4.Multiply(new Vector4(0, 0, 0, -10), 1.0f),
|
||||
Velocity = msg.Angle.ToWorldVec(),
|
||||
Acceleration = msg.Angle.ToWorldVec() * 5f,
|
||||
Born = curTime,
|
||||
DeathTime = curTime.Add(TimeSpan.FromMilliseconds(300f)),
|
||||
};
|
||||
|
||||
_effectSystem.CreateEffect(effect);
|
||||
}
|
||||
EntityManager.RaisePredictiveEvent(new StartHeavyAttackEvent(weapon.Owner));
|
||||
weapon.WindUpStart = currentTime;
|
||||
}
|
||||
|
||||
foreach (var hit in msg.Hits)
|
||||
// Try to do a heavy attack.
|
||||
if (useDown == BoundKeyState.Down)
|
||||
{
|
||||
if (!EntityManager.EntityExists(hit))
|
||||
var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition);
|
||||
EntityCoordinates coordinates;
|
||||
|
||||
// Bro why would I want a ternary here
|
||||
// ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MapManager.TryFindGridAt(mousePos, out var grid))
|
||||
{
|
||||
continue;
|
||||
coordinates = EntityCoordinates.FromMap(grid.GridEntityId, mousePos, EntityManager);
|
||||
}
|
||||
else
|
||||
{
|
||||
coordinates = EntityCoordinates.FromMap(MapManager.GetMapEntityId(mousePos.MapId), mousePos, EntityManager);
|
||||
}
|
||||
|
||||
if (!EntityManager.TryGetComponent(hit, out ISpriteComponent? sprite))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var originalColor = sprite.Color;
|
||||
var newColor = Color.Red * originalColor;
|
||||
sprite.Color = newColor;
|
||||
|
||||
hit.SpawnTimer(100, () =>
|
||||
{
|
||||
// Only reset back to the original color if something else didn't change the color in the mean time.
|
||||
if (sprite.Color == newColor)
|
||||
{
|
||||
sprite.Color = originalColor;
|
||||
}
|
||||
});
|
||||
EntityManager.RaisePredictiveEvent(new HeavyAttackEvent(weapon.Owner, coordinates));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private void PlayLunge(PlayLungeAnimationMessage msg)
|
||||
if (weapon.WindUpStart != null)
|
||||
{
|
||||
if (EntityManager.EntityExists(msg.Source))
|
||||
EntityManager.RaisePredictiveEvent(new StopHeavyAttackEvent(weapon.Owner));
|
||||
}
|
||||
|
||||
// Light attack
|
||||
if (useDown == BoundKeyState.Down)
|
||||
{
|
||||
if (weapon.Attacking || weapon.NextAttack > Timing.CurTime)
|
||||
{
|
||||
msg.Source.EnsureComponent<MeleeLungeComponent>().SetData(msg.Angle);
|
||||
return;
|
||||
}
|
||||
|
||||
var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition);
|
||||
EntityCoordinates coordinates;
|
||||
|
||||
// Bro why would I want a ternary here
|
||||
// ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
|
||||
if (MapManager.TryFindGridAt(mousePos, out var grid))
|
||||
{
|
||||
coordinates = EntityCoordinates.FromMap(grid.GridEntityId, mousePos, EntityManager);
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIXME: This should never happen.
|
||||
Logger.Error($"Tried to play a lunge animation, but the entity \"{msg.Source}\" does not exist.");
|
||||
coordinates = EntityCoordinates.FromMap(MapManager.GetMapEntityId(mousePos.MapId), mousePos, EntityManager);
|
||||
}
|
||||
|
||||
EntityUid? target = null;
|
||||
|
||||
// TODO: UI Refactor update I assume
|
||||
if (_stateManager.CurrentState is GameplayStateBase screen)
|
||||
{
|
||||
target = screen.GetEntityUnderPosition(mousePos);
|
||||
}
|
||||
|
||||
EntityManager.RaisePredictiveEvent(new LightAttackEvent(target, weapon.Owner, coordinates));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (weapon.Attacking)
|
||||
{
|
||||
EntityManager.RaisePredictiveEvent(new StopAttackEvent(weapon.Owner));
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool DoDisarm(EntityUid user, DisarmAttackEvent ev, MeleeWeaponComponent component)
|
||||
{
|
||||
if (!base.DoDisarm(user, ev, component))
|
||||
return false;
|
||||
|
||||
if (!HasComp<CombatModeComponent>(user))
|
||||
return false;
|
||||
|
||||
// If target doesn't have hands then we can't disarm so will let the player know it's pointless.
|
||||
if (!HasComp<HandsComponent>(ev.Target!.Value))
|
||||
{
|
||||
if (Timing.IsFirstTimePredicted)
|
||||
PopupSystem.PopupEntity(Loc.GetString("disarm-action-disarmable", ("targetName", ev.Target.Value)), ev.Target.Value, Filter.Local());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void Popup(string message, EntityUid? uid, EntityUid? user)
|
||||
{
|
||||
if (!Timing.IsFirstTimePredicted || uid == null)
|
||||
return;
|
||||
|
||||
PopupSystem.PopupEntity(message, uid.Value, Filter.Local());
|
||||
}
|
||||
|
||||
private void OnMeleeLunge(MeleeLungeEvent ev)
|
||||
{
|
||||
DoLunge(ev.Entity, ev.Angle, ev.LocalPos, ev.Animation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does all of the melee effects for a player that are predicted, i.e. character lunge and weapon animation.
|
||||
/// </summary>
|
||||
public override void DoLunge(EntityUid user, Angle angle, Vector2 localPos, string? animation)
|
||||
{
|
||||
if (!Timing.IsFirstTimePredicted)
|
||||
return;
|
||||
|
||||
var lunge = GetLungeAnimation(localPos);
|
||||
|
||||
// Stop any existing lunges on the user.
|
||||
_animation.Stop(user, MeleeLungeKey);
|
||||
_animation.Play(user, lunge, MeleeLungeKey);
|
||||
|
||||
// Clientside entity to spawn
|
||||
if (animation != null)
|
||||
{
|
||||
var animationUid = Spawn(animation, new EntityCoordinates(user, Vector2.Zero));
|
||||
|
||||
if (localPos != Vector2.Zero && TryComp<SpriteComponent>(animationUid, out var sprite))
|
||||
{
|
||||
sprite[0].AutoAnimated = false;
|
||||
|
||||
if (TryComp<WeaponArcVisualsComponent>(animationUid, out var arcComponent))
|
||||
{
|
||||
sprite.NoRotation = true;
|
||||
sprite.Rotation = localPos.ToWorldAngle();
|
||||
var distance = Math.Clamp(localPos.Length / 2f, 0.2f, 1f);
|
||||
|
||||
switch (arcComponent.Animation)
|
||||
{
|
||||
case WeaponArcAnimation.Slash:
|
||||
_animation.Play(animationUid, GetSlashAnimation(sprite, angle), "melee-slash");
|
||||
break;
|
||||
case WeaponArcAnimation.Thrust:
|
||||
_animation.Play(animationUid, GetThrustAnimation(sprite, distance), "melee-thrust");
|
||||
break;
|
||||
case WeaponArcAnimation.None:
|
||||
sprite.Offset = localPos.Normalized * distance;
|
||||
_animation.Play(animationUid, GetStaticAnimation(sprite), "melee-fade");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Animation GetSlashAnimation(SpriteComponent sprite, Angle arc)
|
||||
{
|
||||
var slashStart = 0.03f;
|
||||
var slashEnd = 0.065f;
|
||||
var length = slashEnd + 0.05f;
|
||||
var startRotation = sprite.Rotation - arc / 2;
|
||||
var endRotation = sprite.Rotation + arc / 2;
|
||||
sprite.NoRotation = true;
|
||||
|
||||
return new Animation()
|
||||
{
|
||||
Length = TimeSpan.FromSeconds(length),
|
||||
AnimationTracks =
|
||||
{
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Rotation),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(startRotation, 0f),
|
||||
new AnimationTrackProperty.KeyFrame(startRotation, slashStart),
|
||||
new AnimationTrackProperty.KeyFrame(endRotation, slashEnd)
|
||||
}
|
||||
},
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Offset),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(startRotation.RotateVec(new Vector2(0f, -1f)), 0f),
|
||||
new AnimationTrackProperty.KeyFrame(startRotation.RotateVec(new Vector2(0f, -1f)), slashStart),
|
||||
new AnimationTrackProperty.KeyFrame(endRotation.RotateVec(new Vector2(0f, -1f)), slashEnd)
|
||||
}
|
||||
},
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Color),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color, slashEnd),
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color.WithAlpha(0f), length),
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Animation GetThrustAnimation(SpriteComponent sprite, float distance)
|
||||
{
|
||||
var length = 0.15f;
|
||||
var thrustEnd = 0.05f;
|
||||
|
||||
return new Animation()
|
||||
{
|
||||
Length = TimeSpan.FromSeconds(length),
|
||||
AnimationTracks =
|
||||
{
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Offset),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Rotation.RotateVec(new Vector2(0f, -distance / 5f)), 0f),
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Rotation.RotateVec(new Vector2(0f, -distance)), thrustEnd),
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Rotation.RotateVec(new Vector2(0f, -distance)), length),
|
||||
}
|
||||
},
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Color),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color, thrustEnd),
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color.WithAlpha(0f), length),
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the fadeout for static weapon arcs.
|
||||
/// </summary>
|
||||
private Animation GetStaticAnimation(SpriteComponent sprite)
|
||||
{
|
||||
var length = 0.15f;
|
||||
|
||||
return new()
|
||||
{
|
||||
Length = TimeSpan.FromSeconds(length),
|
||||
AnimationTracks =
|
||||
{
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Color),
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color, 0f),
|
||||
new AnimationTrackProperty.KeyFrame(sprite.Color.WithAlpha(0f), length)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the sprite offset animation to use for mob lunges.
|
||||
/// </summary>
|
||||
private Animation GetLungeAnimation(Vector2 direction)
|
||||
{
|
||||
var length = 0.1f;
|
||||
|
||||
return new Animation
|
||||
{
|
||||
Length = TimeSpan.FromSeconds(length),
|
||||
AnimationTracks =
|
||||
{
|
||||
new AnimationTrackComponentProperty()
|
||||
{
|
||||
ComponentType = typeof(SpriteComponent),
|
||||
Property = nameof(SpriteComponent.Offset),
|
||||
InterpolationMode = AnimationInterpolationMode.Linear,
|
||||
KeyFrames =
|
||||
{
|
||||
new AnimationTrackProperty.KeyFrame(direction.Normalized * 0.15f, 0f),
|
||||
new AnimationTrackProperty.KeyFrame(Vector2.Zero, length)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
135
Content.Client/Weapons/Melee/MeleeWindupOverlay.cs
Normal file
135
Content.Client/Weapons/Melee/MeleeWindupOverlay.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
using Content.Client.DoAfter;
|
||||
using Content.Client.Resources;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Client.Weapons.Melee;
|
||||
|
||||
public sealed class MeleeWindupOverlay : Overlay
|
||||
{
|
||||
private readonly IEntityManager _entManager;
|
||||
private readonly IGameTiming _timing;
|
||||
private readonly SharedTransformSystem _transform;
|
||||
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV;
|
||||
|
||||
private readonly Texture _texture;
|
||||
private readonly ShaderInstance _shader;
|
||||
|
||||
public MeleeWindupOverlay(IEntityManager entManager, IGameTiming timing, IPrototypeManager protoManager, IResourceCache cache)
|
||||
{
|
||||
_entManager = entManager;
|
||||
_timing = timing;
|
||||
_transform = _entManager.EntitySysManager.GetEntitySystem<SharedTransformSystem>();
|
||||
_texture = cache.GetTexture("/Textures/Interface/Misc/progress_bar.rsi/icon.png");
|
||||
_shader = protoManager.Index<ShaderPrototype>("unshaded").Instance();
|
||||
}
|
||||
|
||||
protected override void Draw(in OverlayDrawArgs args)
|
||||
{
|
||||
var handle = args.WorldHandle;
|
||||
var rotation = args.Viewport.Eye?.Rotation ?? Angle.Zero;
|
||||
var spriteQuery = _entManager.GetEntityQuery<SpriteComponent>();
|
||||
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();
|
||||
var tickTime = (float) _timing.TickPeriod.TotalSeconds;
|
||||
var tickFraction = _timing.TickFraction / (float) ushort.MaxValue * tickTime;
|
||||
|
||||
// If you use the display UI scale then need to set max(1f, displayscale) because 0 is valid.
|
||||
const float scale = 1f;
|
||||
var scaleMatrix = Matrix3.CreateScale(new Vector2(scale, scale));
|
||||
var rotationMatrix = Matrix3.CreateRotation(-rotation);
|
||||
handle.UseShader(_shader);
|
||||
var currentTime = _timing.CurTime;
|
||||
|
||||
foreach (var comp in _entManager.EntityQuery<MeleeWeaponComponent>(true))
|
||||
{
|
||||
if (comp.WindUpStart == null ||
|
||||
comp.Attacking)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!xformQuery.TryGetComponent(comp.Owner, out var xform) ||
|
||||
xform.MapID != args.MapId)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var worldPosition = _transform.GetWorldPosition(xform);
|
||||
var worldMatrix = Matrix3.CreateTranslation(worldPosition);
|
||||
Matrix3.Multiply(scaleMatrix, worldMatrix, out var scaledWorld);
|
||||
Matrix3.Multiply(rotationMatrix, scaledWorld, out var matty);
|
||||
|
||||
handle.SetTransform(matty);
|
||||
var offset = -_texture.Height / scale;
|
||||
|
||||
// Use the sprite itself if we know its bounds. This means short or tall sprites don't get overlapped
|
||||
// by the bar.
|
||||
float yOffset;
|
||||
if (spriteQuery.TryGetComponent(comp.Owner, out var sprite))
|
||||
{
|
||||
yOffset = -sprite.Bounds.Height / 2f - 0.05f;
|
||||
}
|
||||
else
|
||||
{
|
||||
yOffset = -0.5f;
|
||||
}
|
||||
|
||||
// Position above the entity (we've already applied the matrix transform to the entity itself)
|
||||
// Offset by the texture size for every do_after we have.
|
||||
var position = new Vector2(-_texture.Width / 2f / EyeManager.PixelsPerMeter,
|
||||
yOffset / scale + offset / EyeManager.PixelsPerMeter * scale);
|
||||
|
||||
// Draw the underlying bar texture
|
||||
handle.DrawTexture(_texture, position);
|
||||
|
||||
// Draw the items overlapping the texture
|
||||
const float startX = 2f;
|
||||
const float endX = 22f;
|
||||
|
||||
// Area marking where to release
|
||||
var ReleaseWidth = 2f * SharedMeleeWeaponSystem.GracePeriod / (float) comp.WindupTime.TotalSeconds * EyeManager.PixelsPerMeter;
|
||||
var releaseMiddle = (endX - startX) / 2f + startX;
|
||||
|
||||
var releaseBox = new Box2(new Vector2(releaseMiddle - ReleaseWidth / 2f, 3f) / EyeManager.PixelsPerMeter,
|
||||
new Vector2(releaseMiddle + ReleaseWidth / 2f, 4f) / EyeManager.PixelsPerMeter);
|
||||
|
||||
releaseBox = releaseBox.Translated(position);
|
||||
handle.DrawRect(releaseBox, Color.LimeGreen);
|
||||
|
||||
// Wraps around back to 0
|
||||
var totalDuration = comp.WindupTime.TotalSeconds * 2;
|
||||
|
||||
var elapsed = (currentTime - comp.WindUpStart.Value).TotalSeconds % (2 * totalDuration);
|
||||
var value = elapsed / totalDuration;
|
||||
|
||||
if (value > 1)
|
||||
{
|
||||
value = 2 - value;
|
||||
}
|
||||
|
||||
var fraction = (float) value;
|
||||
|
||||
var xPos = (endX - startX) * fraction + startX;
|
||||
|
||||
// In pixels
|
||||
const float Width = 2f;
|
||||
// If we hit the end we won't draw half the box so we need to subtract the end pos from it
|
||||
var endPos = xPos + Width / 2f;
|
||||
|
||||
var box = new Box2(new Vector2(Math.Max(startX, endPos - Width), 3f) / EyeManager.PixelsPerMeter,
|
||||
new Vector2(Math.Min(endX, endPos), 4f) / EyeManager.PixelsPerMeter);
|
||||
|
||||
box = box.Translated(position);
|
||||
handle.DrawRect(box, Color.White);
|
||||
}
|
||||
|
||||
handle.UseShader(null);
|
||||
handle.SetTransform(Matrix3.Identity);
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace Content.Client.Weapons.Ranged;
|
||||
|
||||
public sealed class ShowSpreadCommand : IConsoleCommand
|
||||
{
|
||||
public string Command => "showspread";
|
||||
public string Command => "showgunspread";
|
||||
public string Description => $"Shows gun spread overlay for debugging";
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
|
||||
@@ -13,11 +13,11 @@ public sealed class GunSpreadOverlay : Overlay
|
||||
public override OverlaySpace Space => OverlaySpace.WorldSpace;
|
||||
|
||||
private IEntityManager _entManager;
|
||||
private IEyeManager _eye;
|
||||
private IGameTiming _timing;
|
||||
private IInputManager _input;
|
||||
private IPlayerManager _player;
|
||||
private GunSystem _guns;
|
||||
private readonly IEyeManager _eye;
|
||||
private readonly IGameTiming _timing;
|
||||
private readonly IInputManager _input;
|
||||
private readonly IPlayerManager _player;
|
||||
private readonly GunSystem _guns;
|
||||
|
||||
public GunSpreadOverlay(IEntityManager entManager, IEyeManager eyeManager, IGameTiming timing, IInputManager input, IPlayerManager player, GunSystem system)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user