diff --git a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs index 6132fdae67..de539eb5ba 100644 --- a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs @@ -270,8 +270,9 @@ public sealed partial class GunSystem : SharedGunSystem var ent = Spawn(message.Prototype, coordinates); var effectXform = Transform(ent); - effectXform.LocalRotation -= MathF.PI / 2; - effectXform.LocalPosition += new Vector2(0f, -0.5f); + TransformSystem.SetLocalPositionRotation(effectXform, + effectXform.LocalPosition + new Vector2(0f, -0.5f), + effectXform.LocalRotation - MathF.PI / 2); var lifetime = 0.4f; @@ -301,14 +302,10 @@ public sealed partial class GunSystem : SharedGunSystem _animPlayer.Play(ent, anim, "muzzle-flash"); var light = EnsureComp(uid); - - if (light.Enabled) - return; - light.NetSyncEnabled = false; - light.Enabled = true; + Lights.SetEnabled(uid, true, light); + Lights.SetRadius(uid, 2f, light); light.Color = Color.FromHex("#cc8e2b"); - light.Radius = 2f; light.Energy = 5f; var animTwo = new Animation() diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 503f98158d..fdbf978bd9 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -45,16 +45,17 @@ public abstract partial class SharedGunSystem : EntitySystem [Dependency] private readonly RechargeBasicEntityAmmoSystem _recharge = default!; [Dependency] protected readonly SharedActionsSystem Actions = default!; [Dependency] protected readonly SharedAppearanceSystem Appearance = default!; + [Dependency] protected readonly SharedAudioSystem Audio = default!; [Dependency] private readonly SharedCombatModeSystem _combatMode = default!; [Dependency] protected readonly SharedContainerSystem Containers = default!; - [Dependency] protected readonly SharedPhysicsSystem Physics = default!; - [Dependency] protected readonly SharedPopupSystem PopupSystem = default!; - [Dependency] protected readonly ThrowingSystem ThrowingSystem = default!; - [Dependency] protected readonly TagSystem TagSystem = default!; - [Dependency] protected readonly SharedAudioSystem Audio = default!; [Dependency] private readonly SharedGravitySystem _gravity = default!; + [Dependency] protected readonly SharedPointLightSystem Lights = default!; + [Dependency] protected readonly SharedPopupSystem PopupSystem = default!; + [Dependency] protected readonly SharedPhysicsSystem Physics = default!; [Dependency] protected readonly SharedProjectileSystem Projectiles = default!; [Dependency] protected readonly SharedTransformSystem TransformSystem = default!; + [Dependency] protected readonly TagSystem TagSystem = default!; + [Dependency] protected readonly ThrowingSystem ThrowingSystem = default!; protected ISawmill Sawmill = default!;