update placeholder portals if the faction/location have changed
This commit is contained in:
@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user