From 889bc2849b3ad1801a36ae28cf351fd9d5100e5d Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 28 May 2025 07:06:58 +0200 Subject: [PATCH] Fix calculation error in spawn offset --- node/server/public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/server/public/app.js b/node/server/public/app.js index 209aa19..af82072 100644 --- a/node/server/public/app.js +++ b/node/server/public/app.js @@ -291,7 +291,7 @@ class SpinnerController { async spawnSpiritWithOffset(spiritData, timeSinceSpawnMs = 0, spiritIntervalMs = 20000) { let startY = 15; - let offset = (typeof timeSinceSpawnMs === 'number' && timeSinceSpawnMs > 0) ? timeSinceSpawnMs / 1000 : 0; + let offset = (typeof timeSinceSpawnMs === 'number' && timeSinceSpawnMs > 0) ? (timeSinceSpawnMs / 1000) -1 : 0; let lifeTime = (spiritIntervalMs ? spiritIntervalMs : 20000) / 1000; const despawnSpeed = 0.8; let spawnPos = { x: 0, y: startY - (despawnSpeed * offset), z: 0.88 };