Fix entering free-flight above void causes y to be NaN

This commit is contained in:
Lukas Rieger 2021-11-21 22:32:22 +01:00 committed by GitHub
parent d62be951f3
commit 0cf9dd2bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,7 +417,7 @@ export class BlueMapApp {
let startDistance = cm.distance; let startDistance = cm.distance;
let startY = cm.position.y; let startY = cm.position.y;
if (!targetY) targetY = this.mapViewer.map.terrainHeightAt(cm.position.x, cm.position.z) + 3; if (!targetY) targetY = this.mapViewer.map.terrainHeightAt(cm.position.x, cm.position.z) + 3 || startY;
let startAngle = cm.angle; let startAngle = cm.angle;
let targetAngle = Math.PI / 2; let targetAngle = Math.PI / 2;
@ -631,4 +631,4 @@ export class BlueMapApp {
} }
} }
} }