Skip to content

Commit

Permalink
beam gaming
Browse files Browse the repository at this point in the history
  • Loading branch information
X0-11 committed Feb 3, 2024
1 parent f30f4d8 commit d20a274
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
var/datum/vector_loc/location // current location of the projectile in pixel space
var/matrix/effect_transform // matrix to rotate and scale projectile effects - putting it here so it doesn't
// have to be recreated multiple time
var/list/segments // Tracers for hitscan projectiles.
var/list/segments = list() // Tracers for hitscan projectiles.

/obj/item/projectile/Initialize()
damtype = damage_type //TODO unify these vars properly
Expand All @@ -95,6 +95,9 @@

//called when the projectile stops flying because it collided with something
/obj/item/projectile/proc/on_impact(var/atom/A)
spawn(tracer_delay_time ? tracer_delay_time : 3)
for(var/obj/effect/projectile/fx in segments)
qdel(fx)
impact_effect(effect_transform) // generate impact effect
return

Expand Down Expand Up @@ -415,7 +418,7 @@

/obj/item/projectile/proc/tracer_effect(var/matrix/M)
if(ispath(tracer_type))
var/obj/effect/projectile/P = new tracer_type(location.loc)
var/obj/effect/projectile/P = new tracer_type(get_turf(src))

if(istype(P))
P.set_transform(M)
Expand Down

0 comments on commit d20a274

Please sign in to comment.