From fad6d180991de129fcce64f324712f698ff18089 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 1 Dec 2013 02:55:40 +0000 Subject: [PATCH] bugfix: the new map data format returns unclaimed portals as level 1 - but IITC needs them handled as level 0 --- code/map_data_render.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/map_data_render.js b/code/map_data_render.js index 604b3c28..6606a022 100644 --- a/code/map_data_render.js +++ b/code/map_data_render.js @@ -268,6 +268,8 @@ window.Render.prototype.createPortalEntity = function(ent) { var portalLevel = parseInt(ent[2].level); var team = teamStringToId(ent[2].team); + // the data returns unclaimed portals as level 1 - but IITC wants them treated as level 0 + if (team == TEAM_NONE) portalLevel = 0; var latlng = L.latLng(ent[2].latE6/1E6, ent[2].lngE6/1E6);