Fixes TGM maploading not respecting upper_y crops (#77495)

## About The Pull Request

I think I forgot how the numbers worked here, seems that way at least
given how the DMM stuff looks
Closes #77482

Thanks to itsmeow for pointing this out
Oh also fixes tgm using maxx for the y comp. it should never actually
matter but yaknow just in case
This commit is contained in:
LemonInTheDark
2023-08-11 01:08:27 +02:00
committed by GitHub
parent c944ee9620
commit 7f4f6cea80
+2 -2
View File
@@ -330,7 +330,7 @@
var/relative_y = first_column.ycrd
var/highest_y = relative_y + y_relative_to_absolute
if(!cropMap && highest_y > world.maxx)
if(!cropMap && highest_y > world.maxy)
if(new_z)
// Need to avoid improperly loaded area/turf_contents
world.increaseMaxY(highest_y, max_zs_to_load = z_offset - 1)
@@ -343,7 +343,7 @@
var/y_skip_above = min(world.maxy - y_relative_to_absolute, y_upper, relative_y)
// How many lines to skip because they'd be above the y cuttoff line
var/y_starting_skip = relative_y - y_skip_above
highest_y += y_starting_skip
highest_y -= y_starting_skip
// Y is the LOWEST it will ever be here, so we can easily set a threshold for how low to go