diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 2622b6ae39..6a9878e086 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -9,8 +9,8 @@ var/max_distance = 0 var/sleep_time = 3 var/finished = 0 - var/target_oldloc = null - var/origin_oldloc = null + var/turf/target_oldloc + var/turf/origin_oldloc var/static_beam = 0 var/beam_type = /obj/effect/ebeam //must be subtype var/timing_id = null @@ -23,13 +23,13 @@ target_oldloc = get_turf(target) sleep_time = beam_sleep_time if(origin_oldloc == origin && target_oldloc == target) - static_beam = 1 + static_beam = TRUE max_distance = maxdistance base_icon = new(beam_icon,beam_icon_state) icon = beam_icon icon_state = beam_icon_state beam_type = btype - if(time < INFINITY) + if(time < INFINITY) addtimer(CALLBACK(src,.proc/End), time) /datum/beam/proc/Start() @@ -42,10 +42,14 @@ return recalculating = TRUE timing_id = null - if(origin && target && get_dist(origin,target)