From f8215107fc2a579ba3f2669703573c1a674f082b Mon Sep 17 00:00:00 2001 From: vita10gy Date: Sat, 23 Feb 2013 16:20:55 -0600 Subject: [PATCH] Portal size tweak Slight change so that level 1 and level 2 portals aren't the same size anymore. Also, make exception for unclaimed portals so they aren't a tiny dot. --- code/map_data.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/map_data.js b/code/map_data.js index a28af7b4..c0c87dfb 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -261,8 +261,11 @@ window.renderPortal = function(ent) { // pre-loads player names for high zoom levels loadPlayerNamesForPortal(ent[2]); - var lvWeight = Math.max(2, portalLevel / 1.5); - var lvRadius = Math.max(portalLevel + 3, 5); + var lvWeight = Math.max(2, Math.floor(portalLevel) / 1.5); + var lvRadius = Math.floor(portalLevel) + 4; + if(team === window.TEAM_NONE) { + lvRadius = 7; + } var p = L.circleMarker(latlng, { radius: lvRadius + (L.Browser.mobile ? PORTAL_RADIUS_ENLARGE_MOBILE : 0),