mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Fixes minimaps crashing the server.
The list wasn't getting gc'ed until the proc ended, causing a fuck ton of lists to use up memory until it went over the memory limit
This commit is contained in:
@@ -41,7 +41,7 @@ var/datum/subsystem/minimap/SSminimap
|
||||
var/icon/minimap = new /icon('icons/minimap.dmi')
|
||||
// Scale it up to our target size.
|
||||
minimap.Scale(MINIMAP_SIZE, MINIMAP_SIZE)
|
||||
|
||||
var/list/obj_icons = list()
|
||||
// Loop over turfs and generate icons.
|
||||
for(var/T in block(locate(x1, y1, z), locate(x2, y2, z)))
|
||||
var/turf/tile = T
|
||||
@@ -64,7 +64,7 @@ var/datum/subsystem/minimap/SSminimap
|
||||
tile_icon = new /icon('icons/obj/atmospherics/pipes/transit_tube.dmi', obj.icon_state, obj.dir)
|
||||
else
|
||||
tile_icon = new /icon(tile.icon, tile.icon_state, tile.dir)
|
||||
var/list/obj_icons = list()
|
||||
obj_icons.Cut()
|
||||
|
||||
obj = locate(/obj/structure) in tile
|
||||
if(obj)
|
||||
@@ -89,4 +89,4 @@ var/datum/subsystem/minimap/SSminimap
|
||||
// Create a new icon and insert the generated minimap, so that BYOND doesn't generate different directions.
|
||||
var/icon/final = new /icon()
|
||||
final.Insert(minimap, "", SOUTH, 1, 0)
|
||||
fcopy(final, map_path(z))
|
||||
fcopy(final, map_path(z))
|
||||
|
||||
Reference in New Issue
Block a user