Merge pull request #7003 from Citadel-Station-13/upstream-merge-38173
[MIRROR] Delay smoothing atoms that have not initialized yet
This commit is contained in:
@@ -6,16 +6,26 @@ SUBSYSTEM_DEF(icon_smooth)
|
|||||||
flags = SS_TICKER
|
flags = SS_TICKER
|
||||||
|
|
||||||
var/list/smooth_queue = list()
|
var/list/smooth_queue = list()
|
||||||
|
var/list/deferred = list()
|
||||||
|
|
||||||
/datum/controller/subsystem/icon_smooth/fire()
|
/datum/controller/subsystem/icon_smooth/fire()
|
||||||
while(smooth_queue.len)
|
var/list/cached = smooth_queue
|
||||||
var/atom/A = smooth_queue[smooth_queue.len]
|
while(cached.len)
|
||||||
smooth_queue.len--
|
var/atom/A = cached[cached.len]
|
||||||
smooth_icon(A)
|
cached.len--
|
||||||
|
if (A.flags_1 & INITIALIZED_1)
|
||||||
|
smooth_icon(A)
|
||||||
|
else
|
||||||
|
deferred += A
|
||||||
if (MC_TICK_CHECK)
|
if (MC_TICK_CHECK)
|
||||||
return
|
return
|
||||||
if (!smooth_queue.len)
|
|
||||||
can_fire = 0
|
if (!cached.len)
|
||||||
|
if (deferred.len)
|
||||||
|
smooth_queue = deferred
|
||||||
|
deferred = cached
|
||||||
|
else
|
||||||
|
can_fire = 0
|
||||||
|
|
||||||
/datum/controller/subsystem/icon_smooth/Initialize()
|
/datum/controller/subsystem/icon_smooth/Initialize()
|
||||||
smooth_zlevel(1,TRUE)
|
smooth_zlevel(1,TRUE)
|
||||||
|
|||||||
@@ -57,12 +57,12 @@
|
|||||||
if(!bounds)
|
if(!bounds)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
smooth_zlevel(world.maxz)
|
|
||||||
repopulate_sorted_areas()
|
repopulate_sorted_areas()
|
||||||
|
|
||||||
SSlighting.initialize_lighting_objects(block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
SSlighting.initialize_lighting_objects(block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
|
||||||
//initialize things that are normally initialized after map load
|
//initialize things that are normally initialized after map load
|
||||||
initTemplateBounds(bounds)
|
initTemplateBounds(bounds)
|
||||||
|
smooth_zlevel(world.maxz)
|
||||||
log_game("Z-level [name] loaded at at [x],[y],[world.maxz]")
|
log_game("Z-level [name] loaded at at [x],[y],[world.maxz]")
|
||||||
|
|
||||||
return level
|
return level
|
||||||
|
|||||||
Reference in New Issue
Block a user