Revert fix for spawn offset calculation error

This commit is contained in:
2025-05-28 07:07:21 +02:00
parent 889bc2849b
commit 3412f47401

View File

@@ -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) -1 : 0;
let offset = (typeof timeSinceSpawnMs === 'number' && timeSinceSpawnMs > 0) ? timeSinceSpawnMs / 1000 : 0;
let lifeTime = (spiritIntervalMs ? spiritIntervalMs : 20000) / 1000;
const despawnSpeed = 0.8;
let spawnPos = { x: 0, y: startY - (despawnSpeed * offset), z: 0.88 };