mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-27 07:08:22 +01:00
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:
@@ -5,7 +5,7 @@
|
||||
name = "map object"
|
||||
scannable = TRUE
|
||||
|
||||
var/list/map_z = null
|
||||
var/list/map_z = list()
|
||||
var/list/extra_z_levels //if you need to manually insist that these z-levels are part of this sector, for things like edge-of-map step trigger transitions rather than multi-z complexes
|
||||
|
||||
var/list/initial_generic_waypoints //store landmark_tag of landmarks that should be added to the actual lists below on init.
|
||||
@@ -30,8 +30,7 @@
|
||||
if(. == INITIALIZE_HINT_QDEL)
|
||||
return
|
||||
|
||||
if(!map_z) // If map_z is already defined, we don't need to find where we are
|
||||
find_z_levels() // This populates map_z and assigns z levels to the ship.
|
||||
find_z_levels() // This populates map_z and assigns z levels to the ship.
|
||||
register_z_levels() // This makes external calls to update global z level information.
|
||||
|
||||
if(!global.using_map.overmap_z)
|
||||
@@ -59,7 +58,8 @@
|
||||
. += A
|
||||
|
||||
/obj/effect/overmap/visitable/proc/find_z_levels()
|
||||
map_z = GetConnectedZlevels(z)
|
||||
if(!LAZYLEN(map_z)) // If map_z is already populated use it as-is, otherwise start with connected z-levels.
|
||||
map_z = GetConnectedZlevels(z)
|
||||
if(LAZYLEN(extra_z_levels))
|
||||
map_z |= extra_z_levels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user