chore: tidy
This commit is contained in:
parent
7141d20a94
commit
78060ded37
|
@ -237,12 +237,15 @@ export default function Ui({disconnected}) {
|
|||
for (const id in payload) {
|
||||
const entity = ecs.get(id);
|
||||
const update = payload[id];
|
||||
if (!update) {
|
||||
continue;
|
||||
}
|
||||
if (update.Sound?.play) {
|
||||
for (const sound of update.Sound.play) {
|
||||
(new Audio(sound)).play();
|
||||
}
|
||||
}
|
||||
if (update?.MainEntity) {
|
||||
if (update.MainEntity) {
|
||||
setMainEntity(localMainEntity = id);
|
||||
}
|
||||
if (localMainEntity === id) {
|
||||
|
@ -275,7 +278,7 @@ export default function Ui({disconnected}) {
|
|||
return () => {
|
||||
document.body.removeEventListener('contextmenu', onContextMenu);
|
||||
};
|
||||
}, [])
|
||||
}, []);
|
||||
return (
|
||||
<div
|
||||
className={styles.ui}
|
||||
|
|
Loading…
Reference in New Issue
Block a user