]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Double Muzzle Flash (#33981)
authorsleepyyapril <123355664+sleepyyapril@users.noreply.github.com>
Thu, 30 Jan 2025 13:34:05 +0000 (09:34 -0400)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2025 13:34:05 +0000 (14:34 +0100)
* 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>
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs

index 62e63501ee8a6b03b12e0b8aa6ec950296fb4f23..35a15178d87601a4f91dd9f19cb8c2e9a7f65f11 100644 (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)