Skip to content

Commit

Permalink
CEILING
Browse files Browse the repository at this point in the history
  • Loading branch information
AyIong committed Feb 1, 2024
1 parent c4d6e59 commit 210c482
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modular_ss220/jukebox/code/jukebox_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
if(isnull(sound_range))
sound_range = world.view
var/list/worldviewsize = getviewsize(sound_range)
x_cutoff = ceil(worldviewsize[1] * 1.25 / 2) // * 1.25 gives us some extra range to fade out with
z_cutoff = ceil(worldviewsize[2] * 1.25 / 2) // and / 2 is because world view is the whole screen, and we want the centre
x_cutoff = CEILING((worldviewsize[1] * 1.25) / 2, 1) // * 1.25 gives us some extra range to fade out with
z_cutoff = CEILING((worldviewsize[2] * 1.25) / 2, 1) // and / 2 is because world view is the whole screen, and we want the centre

if(requires_range_check)
var/static/list/connections = list(COMSIG_ATOM_ENTERED = PROC_REF(check_new_listener))
Expand Down Expand Up @@ -153,8 +153,8 @@
return
sound_range = new_range
var/list/worldviewsize = getviewsize(sound_range)
x_cutoff = ceil(worldviewsize[1] / 2)
z_cutoff = ceil(worldviewsize[2] / 2)
x_cutoff = CEILING(worldviewsize[1] / 2, 1)
z_cutoff = CEILING(worldviewsize[2] / 2, 1)
update_all()

/**
Expand Down

0 comments on commit 210c482

Please sign in to comment.