Fix Double Muzzle Flash (#33981)

* Pass user to effects to properly fix double muzzle flash.

* Use gun when user is null.

* Update MuzzleFlashEvent.cs

* Update MuzzleFlashEvent.cs

* Update GunSystem.cs

* Update SharedGunSystem.cs

* Update MuzzleFlashEvent.cs

* Update SharedGunSystem.cs

* Update SharedGunSystem.cs

* Update Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

---------

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
sleepyyapril
2025-01-30 09:34:05 -04:00
committed by GitHub
parent ca297f576e
commit 5af13ae807

View File

@@ -508,7 +508,7 @@ public abstract partial class SharedGunSystem : EntitySystem
return;
var ev = new MuzzleFlashEvent(GetNetEntity(gun), sprite, worldAngle);
CreateEffect(gun, ev, gun);
CreateEffect(gun, ev, user);
}
public void CauseImpulse(EntityCoordinates fromCoordinates, EntityCoordinates toCoordinates, EntityUid user, PhysicsComponent userPhysics)