From 87e18deb9f96159e7b861dd0c2f5372799fa6800 Mon Sep 17 00:00:00 2001 From: SepuIka <63119568+SepuIka@users.noreply.github.com> Date: Sun, 5 May 2024 21:56:38 +0300 Subject: [PATCH] Tracers optimization. - Reducing amount of effects per tile. - Redusing effects life. --- code/modules/projectiles/effects.dm | 6 +++--- code/modules/projectiles/projectile.dm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/projectiles/effects.dm b/code/modules/projectiles/effects.dm index f8018fed79..faf140e9fa 100644 --- a/code/modules/projectiles/effects.dm +++ b/code/modules/projectiles/effects.dm @@ -97,12 +97,12 @@ /obj/effect/projectile/tracer/update() var/dt = world.time - call_time - if(dt > 4) + if(dt > 2) loc = null qdel(src) return - alpha *= 0.9 - spawn(0.5) + alpha *= 0.8 + spawn(0.6) update() /obj/effect/projectile/tracer/minor diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index e7b8309809..825e4a9981 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -854,11 +854,11 @@ /obj/item/projectile/proc/tracer_effect() if (ispath(tracer_type)) - for(var/i = 1, i <= 4, i++) + for(var/i = 1, i <= 2, i++) var/obj/effect/projectile/P = new tracer_type(starting) if (istype(P)) P.alpha *= 0.6 / i - var/px_dist = ((permutated.len - 1) * world.icon_size) + (i * 8) + var/px_dist = ((permutated.len - 1) * world.icon_size) + (i * 16) P.activate(get_angle(), px_dist, starting) /obj/item/projectile/proc/impact_effect()