Skip to content

Commit

Permalink
fixup! placeholder: use timestamp from link/field
Browse files Browse the repository at this point in the history
  • Loading branch information
le-jeu committed Jan 8, 2022
1 parent e62410f commit 8a4e4cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/code/map_data_render.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ window.Render.prototype.createFieldEntity = function(ent) {
//create placeholder portals for field corners. we already do links, but there are the odd case where this is useful
for (var i=0; i<3; i++) {
var p=data.points[i];
this.createPlaceholderPortalEntity(p.guid, p.latE6, p.lngE6, data.team, data.timestamp);
this.createPlaceholderPortalEntity(p.guid, p.latE6, p.lngE6, data.team, 0);
}

// check if entity already exists
Expand Down
2 changes: 1 addition & 1 deletion core/code/portal_marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ L.PortalMarker = L.CircleMarker.extend({
willUpdate: function (details) {
// details are from a placeholder
if (details.level === undefined) {
// if team differs and corresponding link/field is more recent
// if team differs and corresponding link is more recent (ignore field)
if (this._details.timestamp < details.timestamp && this._details.team !== details.team)
return true;
// in any other case
Expand Down

0 comments on commit 8a4e4cf

Please sign in to comment.