Fix map hires sometimes not loading when loading a map
This commit is contained in:
parent
ceb31b68eb
commit
c9a8c83d6e
|
@ -726,6 +726,7 @@ export class BlueMapApp {
|
||||||
controls.ortho = parseFloat(values[8]);
|
controls.ortho = parseFloat(values[8]);
|
||||||
|
|
||||||
this.updatePageAddress();
|
this.updatePageAddress();
|
||||||
|
this.mapViewer.updateLoadedMapArea();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,8 +58,8 @@ export class ControlsManager {
|
||||||
this.lastOrtho = this.ortho;
|
this.lastOrtho = this.ortho;
|
||||||
this.lastTilt = this.tilt;
|
this.lastTilt = this.tilt;
|
||||||
|
|
||||||
this.lastMapUpdatePosition = this.position.clone();
|
this.lastMapUpdatePosition = null;
|
||||||
this.lastMapUpdateDistance = this.distance;
|
this.lastMapUpdateDistance = null;
|
||||||
|
|
||||||
this.averageDeltaTime = 16;
|
this.averageDeltaTime = 16;
|
||||||
|
|
||||||
|
@ -157,9 +157,11 @@ export class ControlsManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
this.lastMapUpdatePosition === null ||
|
||||||
|
this.lastMapUpdateDistance === null ||
|
||||||
Math.abs(this.lastMapUpdatePosition.x - this.position.x) >= triggerDistance ||
|
Math.abs(this.lastMapUpdatePosition.x - this.position.x) >= triggerDistance ||
|
||||||
Math.abs(this.lastMapUpdatePosition.z - this.position.z) >= triggerDistance ||
|
Math.abs(this.lastMapUpdatePosition.z - this.position.z) >= triggerDistance ||
|
||||||
(this.distance < 1000 && this.lastMapUpdateDistance > 1000)
|
(this.distance < 1000 && this.lastMapUpdateDistance >= 1000)
|
||||||
) {
|
) {
|
||||||
this.lastMapUpdatePosition = this.position.clone();
|
this.lastMapUpdatePosition = this.position.clone();
|
||||||
this.lastMapUpdateDistance = this.distance;
|
this.lastMapUpdateDistance = this.distance;
|
||||||
|
|
Loading…
Reference in New Issue