From 102e21110af93b546083fb7ab0136aa1a9b2645e Mon Sep 17 00:00:00 2001
From: Paolo Brasolin <paolo.brasolin@eurac.edu>
Date: Tue, 29 Mar 2022 18:10:02 +0200
Subject: [PATCH] fix: #fe spawn delay, for the nth time

---
 frontend/src/js/fight_scene.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frontend/src/js/fight_scene.ts b/frontend/src/js/fight_scene.ts
index ec8f8a6..7529674 100644
--- a/frontend/src/js/fight_scene.ts
+++ b/frontend/src/js/fight_scene.ts
@@ -345,7 +345,7 @@ async function spawn(scene: any) {
   scene.time.now;
   const delay =
     (8 * 1000 * (60 * 1000 - scene.time.now)) / 60 / 1000 + 2 * 1000;
-  setTimeout(() => spawn(scene), Math.min(200, delay));
+  setTimeout(() => spawn(scene), Math.max(2000, delay));
 }
 
 async function spawnFoe(scene: FightScene) {
-- 
GitLab