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 authored and modos189 committed Nov 18, 2024
1 parent f20886b commit 46550e5
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 @@ -457,7 +457,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 @@ -67,7 +67,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 46550e5

Please sign in to comment.