From ad18da3b93ccac603e9866c39a5d56403651a55e Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 14 Jul 2024 02:28:32 -0500 Subject: [PATCH] fix: monopolizers reset on ECS change --- app/react-components/ui.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/react-components/ui.jsx b/app/react-components/ui.jsx index 65e7b84..a2980e6 100644 --- a/app/react-components/ui.jsx +++ b/app/react-components/ui.jsx @@ -241,8 +241,9 @@ export default function Ui({disconnected}) { }); }, [chatIsOpen, client, debug, devtoolsIsOpen, monopolizers, setDebug, setScale]); usePacket('EcsChange', async () => { - setMainEntity(undefined); setEcs(new ClientEcs({Components, Systems})); + setMainEntity(undefined); + setMonopolizers([]); }, [Components, Systems, setEcs, setMainEntity]); usePacket('Tick', async (payload, client) => { if (0 === Object.keys(payload.ecs).length) {