Skip to content

Commit

Permalink
Fix ghost alerts that are offset because of mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Oct 20, 2023
1 parent 8b14285 commit 396b927
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,14 @@ var/global/list/limb_types_by_name = list(
var/iheight = source_icon.Height()
var/iwidth = source_icon.Width()
var/higher_power = (iheight > iwidth) ? iheight : iwidth
alert_overlay.pixel_y = initial(source.pixel_y)
alert_overlay.pixel_x = initial(source.pixel_x)
if(higher_power > 32)
var/diff = 32 / higher_power
alert_overlay.transform = alert_overlay.transform.Scale(diff, diff)
if(higher_power > 48)
alert_overlay.pixel_y = -(iheight / 2) * diff
alert_overlay.pixel_x = -(iwidth / 2) * diff
alert_overlay.pixel_y = -(iheight * 0.5) * diff
alert_overlay.pixel_x = -(iwidth * 0.5) * diff


alert_overlay.layer = FLOAT_LAYER
Expand Down

0 comments on commit 396b927

Please sign in to comment.