Fix sector initialization stack overflow crash.

- Replace changes from 8c7371c5d4
    - Removed debugging prints in skybox generation
    - Reverted change to GetConnnectedZLevels to avoid the chicken-or-egg initialization issue of find_z_levels() requiring knowledge of a sector's z-levels during the attempt to determine a sector's z-levels.
    - Make find_z_levels() always called again so that lazy open space initialization works on landable ships again.
- Instead, allow static configuration of sector map_z to override the default behavior of calling GetConnectedZLevels()
This commit is contained in:
Leshana
2020-06-25 10:36:16 -04:00
parent a33a941b18
commit 07d483203d
3 changed files with 5 additions and 11 deletions

View File

@@ -37,8 +37,6 @@ var/list/z_levels = list()// Each bit re... haha just kidding this is a list of
return HasBelow(turf.z) ? get_step(turf, DOWN) : null
/proc/GetConnectedZlevels(z)
if(z in using_map.map_levels)
return using_map.get_map_levels(z, FALSE) // Connected z levels aren't necessarily attached by multi-z, using_map shound know the details
. = list(z)
for(var/level = z, HasBelow(level), level--)
. |= level-1