update placeholder portals if the faction/location have changed

This commit is contained in:
Jon Atkins
2015-11-11 07:40:45 +00:00
parent d166d88263
commit b7361c0e05

View File

@ -267,6 +267,17 @@ window.Render.prototype.createPlaceholderPortalEntity = function(guid,latE6,lngE
] ]
]; ];
// placeholder portals don't have a useful timestamp value - so the standard code that checks for updated
// portal details doesn't apply
// so, check that the basic details are valid and delete the existing portal if out of date
if (guid in window.portals) {
var p = window.portals[guid];
if (team != p.options.data.team || latE6 != p.options.data.latE6 || lngE6 != p.options.data.lngE6) {
// team or location have changed - delete existing portal
this.deletePortalEntity(guid);
}
}
this.createPortalEntity(ent); this.createPortalEntity(ent);
} }