plugin: bugfix: zero health IS possible for a very badly damaged portal (one resonator under 1% health)

This commit is contained in:
Jon Atkins 2013-12-01 13:46:07 +00:00
parent c4a9af9966
commit 19bfccdbbc

View File

@ -24,7 +24,7 @@ window.plugin.portalHighligherNeedsRecharge = function() {};
window.plugin.portalHighligherNeedsRecharge.highlight = function(data) {
var d = data.portal.options.data;
var portal_health = d.health/100;
if(portal_health > 0 && portal_health < 1) {
if(data.portal.options.team != TEAM_NONE && portal_health < 1) {
var fill_opacity = (1-portal_health)*.85 + .15;
var color;
if (portal_health > .85) color = 'yellow';