Kaynağa Gözat

Spawn entities on the ground if snap is on

Previously, entities always appeared in the middle of the screen
with an unlocked y-axis. Now, they will appear on the ground
if snapping is enabled and the ground is in sight.
master
Fen Dweller 3 yıl önce
ebeveyn
işleme
b2dbc1c8a1
1 değiştirilmiş dosya ile 6 ekleme ve 3 silme
  1. +6
    -3
      macrovision.js

+ 6
- 3
macrovision.js Dosyayı Görüntüle

@@ -5572,9 +5572,12 @@ function prepareEntities() {
if (config.lockYAxis) {
yOffset = getVerticalOffset();
} else {
yOffset = config.lockYAxis
? 0
: config.height.toNumber("meters") / 2;
// Snap to the ground if it's visible.
if (config.groundSnap && pos2pix({x: 0, y: 0}).y < canvasHeight + 50) {
yOffset = -config.y;
} else {
yOffset = config.height.toNumber("meters") / 2;
}
}
displayEntity(
newEntity,


Yükleniyor…
İptal
Kaydet