fix: monopolizers reset on ECS change
This commit is contained in:
parent
12ce0ccbd5
commit
ad18da3b93
|
@ -241,8 +241,9 @@ export default function Ui({disconnected}) {
|
||||||
});
|
});
|
||||||
}, [chatIsOpen, client, debug, devtoolsIsOpen, monopolizers, setDebug, setScale]);
|
}, [chatIsOpen, client, debug, devtoolsIsOpen, monopolizers, setDebug, setScale]);
|
||||||
usePacket('EcsChange', async () => {
|
usePacket('EcsChange', async () => {
|
||||||
setMainEntity(undefined);
|
|
||||||
setEcs(new ClientEcs({Components, Systems}));
|
setEcs(new ClientEcs({Components, Systems}));
|
||||||
|
setMainEntity(undefined);
|
||||||
|
setMonopolizers([]);
|
||||||
}, [Components, Systems, setEcs, setMainEntity]);
|
}, [Components, Systems, setEcs, setMainEntity]);
|
||||||
usePacket('Tick', async (payload, client) => {
|
usePacket('Tick', async (payload, client) => {
|
||||||
if (0 === Object.keys(payload.ecs).length) {
|
if (0 === Object.keys(payload.ecs).length) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user