mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
[MIRROR] Ensures area contents respects world.maxx/y expanding [MDB IGNORE] (#18554)
This commit is contained in:
@@ -319,8 +319,12 @@
|
||||
var/relative_y = first_column.ycrd
|
||||
var/highest_y = relative_y + y_relative_to_absolute
|
||||
|
||||
if(!cropMap && highest_y > world.maxy)
|
||||
world.maxy = highest_y // Expand Y here. X is expanded later on
|
||||
if(!cropMap && highest_y > world.maxx)
|
||||
if(new_z)
|
||||
// Need to avoid improperly loaded area/turf_contents
|
||||
world.increaseMaxY(highest_y, max_zs_to_load = z_offset - 1)
|
||||
else
|
||||
world.increaseMaxY(highest_y)
|
||||
expanded_y = TRUE
|
||||
|
||||
// Skip Y coords that are above the smallest of the three params
|
||||
@@ -353,7 +357,11 @@
|
||||
var/delta = max(final_x - x_delta_with, 0)
|
||||
final_x -= delta
|
||||
if(final_x > world.maxx && !cropMap)
|
||||
world.maxx = final_x
|
||||
if(new_z)
|
||||
// Need to avoid improperly loaded area/turf_contents
|
||||
world.increaseMaxX(final_x, max_zs_to_load = z_offset - 1)
|
||||
else
|
||||
world.increaseMaxX(final_x)
|
||||
expanded_x = TRUE
|
||||
|
||||
var/lowest_x = max(x_lower, 1 - x_relative_to_absolute)
|
||||
@@ -443,7 +451,11 @@
|
||||
var/ycrd = relative_y + y_relative_to_absolute
|
||||
var/zcrd = gset.zcrd + z_offset - 1
|
||||
if(!cropMap && ycrd > world.maxy)
|
||||
world.maxy = ycrd // Expand Y here. X is expanded in the loop below
|
||||
if(new_z)
|
||||
// Need to avoid improperly loaded area/turf_contents
|
||||
world.increaseMaxY(ycrd, max_zs_to_load = z_offset - 1)
|
||||
else
|
||||
world.increaseMaxY(ycrd)
|
||||
expanded_y = TRUE
|
||||
var/zexpansion = zcrd > world.maxz
|
||||
var/no_afterchange = no_changeturf
|
||||
@@ -495,7 +507,11 @@
|
||||
final_x -= delta
|
||||
x_target = x_step_count * key_len
|
||||
if(final_x > world.maxx && !cropMap)
|
||||
world.maxx = final_x
|
||||
if(new_z)
|
||||
// Need to avoid improperly loaded area/turf_contents
|
||||
world.increaseMaxX(final_x, max_zs_to_load = z_offset - 1)
|
||||
else
|
||||
world.increaseMaxX(final_x)
|
||||
expanded_x = TRUE
|
||||
|
||||
// We're gonna track the first and last pairs of coords we find
|
||||
|
||||
Reference in New Issue
Block a user