From 0c60294c0f6ba73cbc37b2ed15a18bf9f9970170 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Thu, 26 Mar 2020 16:21:10 -0700 Subject: [PATCH] does the quirky thing where a beam with origin/target in a container doesn't cut the map in half because byond is quirky and things inside things are x/y/z=0 (#11585) * Update beam.dm * god i hate this * Update beam.dm * ok * touching kevinz PR in an inappropriate way. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/datums/beam.dm | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) 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)