From 0ce64231c75fdfa62c73341c1060c9665b365b76 Mon Sep 17 00:00:00 2001 From: hkc Date: Thu, 11 Jul 2024 05:44:21 +0300 Subject: [PATCH] THE GREAT BOTTENING --- swarm/manager.py | 2 +- swarm/settings.json | 4 ++-- swarm/worker.py | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/swarm/manager.py b/swarm/manager.py index 2263bcd..43de053 100644 --- a/swarm/manager.py +++ b/swarm/manager.py @@ -352,7 +352,7 @@ class Manager: async def animator(self): while True: for animation in self.animations: - frame = int(time.time() / animation.spf) % len( + frame = int(time.time() / animation.spf + animation.offset) % len( animation.frames ) self.put_image( diff --git a/swarm/settings.json b/swarm/settings.json index acc3668..dd4d169 100644 --- a/swarm/settings.json +++ b/swarm/settings.json @@ -50,8 +50,8 @@ "path": "../pictures/non-reflection.gif", "x": 300, "y": 40, - "spf": 15, - "offset": -408 + "spf": 5, + "offset": -467 }, { "type": "animation", diff --git a/swarm/worker.py b/swarm/worker.py index 8a4a4c5..05520b6 100644 --- a/swarm/worker.py +++ b/swarm/worker.py @@ -73,6 +73,8 @@ class WorkerManager: cookie = bot_index, self._restarts[bot_index] self.workers.add(cookie) + await sio.send("unsubscribe") + try: batch = 0 while sio.connected: