Skip to content

Commit

Permalink
Merge pull request Civ13#2797 from SepuIka/master
Browse files Browse the repository at this point in the history
Tracers optimization.
  • Loading branch information
Bierkraan authored May 6, 2024
2 parents 78243d7 + 87e18de commit 357f36a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions code/modules/projectiles/effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 357f36a

Please sign in to comment.