Skip to content

Commit

Permalink
merged x/y offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Oct 27, 2023
1 parent deaad0a commit 83017aa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions code/datums/components/overlay_lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
///Cast range for the directional cast (how far away the atom is moved)
var/cast_range = 2

var/base_offset_x
var/base_offset_y
var/base_offset


/datum/component/overlay_lighting/Initialize(_range, _power, _color, starts_on, is_directional)
Expand Down Expand Up @@ -342,8 +341,7 @@
visible_mask.transform = null
return
var/offset = (pixel_bounds - 32) * 0.5
base_offset_x = offset
base_offset_y = offset
base_offset = offset
var/matrix/transform = new
transform.Translate(-offset, -offset)
visible_mask.transform = transform
Expand Down Expand Up @@ -534,7 +532,7 @@
if(current_holder && overlay_lighting_flags & LIGHTING_ON)
current_holder.underlays -= visible_mask
var/matrix/transform = new
transform.Translate(multitile_translate_x - base_offset_x, multitile_translate_y - base_offset_y)
transform.Translate(multitile_translate_x - base_offset, multitile_translate_y - base_offset)
visible_mask.transform = transform
if(current_holder && overlay_lighting_flags & LIGHTING_ON)
current_holder.underlays += visible_mask
Expand Down

0 comments on commit 83017aa

Please sign in to comment.