Fix muzzle flash lights (#17843)
This commit is contained in:
@@ -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<PointLightComponent>(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()
|
||||
|
||||
Reference in New Issue
Block a user