fix ninja no guns (#20184)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-15 04:12:14 +01:00
committed by GitHub
parent c34913b227
commit c25b769132
2 changed files with 11 additions and 1 deletions

View File

@@ -226,12 +226,17 @@ public abstract partial class SharedGunSystem : EntitySystem
// check if anything wants to prevent shooting
var prevention = new ShotAttemptedEvent
{
User = user
User = user,
Used = gunUid
};
RaiseLocalEvent(gunUid, ref prevention);
if (prevention.Cancelled)
return;
RaiseLocalEvent(user, ref prevention);
if (prevention.Cancelled)
return;
// Need to do this to play the clicking sound for empty automatic weapons
// but not play anything for burst fire.
if (gun.NextFire > curTime)