Fix muzzle flashes for other players (#10454)

This commit is contained in:
metalgearsloth
2022-08-09 14:30:32 +10:00
committed by GitHub
parent 4becd815b1
commit 75dfbdb57f
3 changed files with 7 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ public sealed partial class GunSystem : SharedGunSystem
base.Initialize();
UpdatesOutsidePrediction = true;
SubscribeLocalEvent<AmmoCounterComponent, ItemStatusCollectMessage>(OnAmmoCounterCollect);
SubscribeLocalEvent<GunComponent, MuzzleFlashEvent>(OnMuzzleFlash);
SubscribeAllEvent<MuzzleFlashEvent>(OnMuzzleFlash);
// Plays animated effects on the client.
SubscribeNetworkEvent<HitscanEvent>(OnHitscan);
@@ -72,9 +72,9 @@ public sealed partial class GunSystem : SharedGunSystem
InitializeSpentAmmo();
}
private void OnMuzzleFlash(EntityUid uid, GunComponent component, MuzzleFlashEvent args)
private void OnMuzzleFlash(MuzzleFlashEvent args)
{
CreateEffect(uid, args);
CreateEffect(args.Uid, args);
}
private void OnHitscan(HitscanEvent ev)