Change wide swing sprites to be that of the weapon used (#21050)

Co-authored-by: notquitehadouken <1isthisameme>
This commit is contained in:
I.K
2023-10-17 20:12:00 -05:00
committed by GitHub
parent b33b57509e
commit df81532469
53 changed files with 160 additions and 103 deletions

View File

@@ -17,8 +17,6 @@ using Robust.Shared.Input;
using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Players;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
namespace Content.Client.Weapons.Melee;
@@ -235,9 +233,10 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
private void OnMeleeLunge(MeleeLungeEvent ev)
{
var ent = GetEntity(ev.Entity);
var entWeapon = GetEntity(ev.Weapon);
// Entity might not have been sent by PVS.
if (Exists(ent))
DoLunge(ent, ev.Angle, ev.LocalPos, ev.Animation);
if (Exists(ent) && Exists(entWeapon))
DoLunge(ent, entWeapon, ev.Angle, ev.LocalPos, ev.Animation);
}
}