From 1bcfa3af91bb56ba1aaee3dcf16f88252ae39802 Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Wed, 11 Dec 2024 18:51:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=B4=D0=B5=D1=80=D0=B0=20=D1=82=D1=80=D0=B0=D1=81=D1=81=D0=B5?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=20=D1=81=20=D1=82=D0=B8=D0=BA=D1=80=D0=B5?= =?UTF-8?q?=D0=B9=D1=82=D0=BE=D0=BC=20=D0=BD=D0=B8=D0=B6=D0=B5=2025?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Weapons/Ranged/Systems/GunSystem.cs | 12 +++--------- Resources/Changelog/ChangelogSunrise.yml | 7 +++++++ .../Objects/Weapons/Guns/Projectiles/hitscan.yml | 2 +- .../Guns/Projectiles/hitscan_tracer.rsi/empty.png | Bin 0 -> 124 bytes .../Guns/Projectiles/hitscan_tracer.rsi/meta.json | 3 +++ 5 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/empty.png diff --git a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs index c9220ae5b4..f2819a4fac 100644 --- a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs @@ -111,8 +111,7 @@ public sealed partial class GunSystem : SharedGunSystem private void OnHitscan(HitscanEvent ev) { - const float tracerInterval = 0.01f; - var activeTracers = new Dictionary(); + const double tracerInterval = 0.01f; foreach (var a in ev.Sprites) { @@ -137,13 +136,7 @@ public sealed partial class GunSystem : SharedGunSystem Timer.Spawn(TimeSpan.FromSeconds(delay), () => { - if (activeTracers.TryGetValue(localIndex, out var existingTracer) && EntityManager.EntityExists(existingTracer)) - { - EntityManager.DeleteEntity(existingTracer); - } - - var tracerEntity = CreateTracerEffect(stepCoords, a.angle, rsi); - activeTracers[localIndex] = tracerEntity; + CreateTracerEffect(stepCoords, a.angle, rsi); }); stepIndex++; @@ -179,6 +172,7 @@ public sealed partial class GunSystem : SharedGunSystem KeyFrames = { new AnimationTrackSpriteFlick.KeyFrame(rsi.RsiState, 0f), + new AnimationTrackSpriteFlick.KeyFrame("empty", 0.02f), } } } diff --git a/Resources/Changelog/ChangelogSunrise.yml b/Resources/Changelog/ChangelogSunrise.yml index 563bf1b71f..5126174f3d 100644 --- a/Resources/Changelog/ChangelogSunrise.yml +++ b/Resources/Changelog/ChangelogSunrise.yml @@ -7784,3 +7784,10 @@ type: Tweak id: 547 time: '2024-12-11T01:59:58.794183+00:00' +- author: VigersRay + changes: + - message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0440\u0435\u043D\ + \u0434\u0435\u0440 \u0441\u043D\u0430\u0440\u044F\u0434\u043E\u0432." + type: Fix + id: 548 + time: '2024-12-11T15:51:17.560149+00:00' diff --git a/Resources/Prototypes/_Sunrise/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml b/Resources/Prototypes/_Sunrise/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml index 0d023de377..ca7bf84490 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml @@ -3,7 +3,7 @@ categories: [ HideSpawnMenu ] components: - type: TimedDespawn - lifetime: 0.05 + lifetime: 0.5 - type: Sprite drawdepth: Effects layers: diff --git a/Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/empty.png b/Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/empty.png new file mode 100644 index 0000000000000000000000000000000000000000..74c5184da2b4603e7d63858d650734d637a69312 GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?3oVGw3ym^DWND5&S@ z;usRq`u3b5BLf4+;SG)T=bhR7vlh(U_A@8`Jx~EM@Z@vY!fd;J+Y}3ssHdx+%Q~lo FCIB4Q99;ka literal 0 HcmV?d00001 diff --git a/Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/meta.json b/Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/meta.json index dd1824c427..e7f1d63f90 100644 --- a/Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/meta.json +++ b/Resources/Textures/_Sunrise/Objects/Weapons/Guns/Projectiles/hitscan_tracer.rsi/meta.json @@ -54,6 +54,9 @@ }, { "name": "blue_laser" + }, + { + "name": "empty" } ] }