From 3d9312f360ff8766c1248325ddecc1f6c9e19b15 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Tue, 12 Apr 2016 17:32:31 -0700 Subject: [PATCH 1/2] Tweaks minimap Now that we know the crashes from minimaps are a case of the clean bot bug, we can re-enable them. And this should make them faster as well. --- code/controllers/subsystem/minimap.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index 5e18b0bbefe..20e6105c995 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -45,15 +45,15 @@ var/datum/subsystem/minimap/SSminimap // Scale it up to our target size. minimap.Scale(MINIMAP_SIZE, MINIMAP_SIZE) - var/counter = 128 + var/counter = 1024 // Loop over turfs and generate icons. for(var/T in block(locate(x1, y1, z), locate(x2, y2, z))) generate_tile(T, minimap) - //byond bug, this fixes OOM crashes by flattening and reseting the minimap icon holder every 128 tiles + //byond bug, this fixes OOM crashes by flattening and reseting the minimap icon holder every so and so tiles counter-- if(counter <= 0) - counter = 128 + counter = 1024 var/icon/flatten = new /icon() flatten.Insert(minimap, "", SOUTH, 1, 0) del(minimap) @@ -109,4 +109,4 @@ var/datum/subsystem/minimap/SSminimap tile_icon.Scale(TILE_SIZE, TILE_SIZE) // Add the tile to the minimap. minimap.Blend(tile_icon, ICON_OVERLAY, ((tile.x - 1) * TILE_SIZE), ((tile.y - 1) * TILE_SIZE)) - del(tile_icon) \ No newline at end of file + del(tile_icon) From f9749a42acb359f9c18c0f7b0bd38e9abdd4489b Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Tue, 12 Apr 2016 17:42:41 -0700 Subject: [PATCH 2/2] Update minimap.dm --- code/controllers/subsystem/minimap.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index 20e6105c995..381640569a7 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -45,7 +45,7 @@ var/datum/subsystem/minimap/SSminimap // Scale it up to our target size. minimap.Scale(MINIMAP_SIZE, MINIMAP_SIZE) - var/counter = 1024 + var/counter = 512 // Loop over turfs and generate icons. for(var/T in block(locate(x1, y1, z), locate(x2, y2, z))) generate_tile(T, minimap) @@ -53,7 +53,7 @@ var/datum/subsystem/minimap/SSminimap //byond bug, this fixes OOM crashes by flattening and reseting the minimap icon holder every so and so tiles counter-- if(counter <= 0) - counter = 1024 + counter = 512 var/icon/flatten = new /icon() flatten.Insert(minimap, "", SOUTH, 1, 0) del(minimap)