Spaces:
Sleeping
Sleeping
update player on leave
Browse files
src/components/buttons/InteractButton.tsx
CHANGED
@@ -58,7 +58,7 @@ export default function InteractButton() {
|
|
58 |
console.log(`Leaving game for player ${userPlayerId}`);
|
59 |
void leave({ worldId , oauthToken});
|
60 |
console.log("game.world",game.world)
|
61 |
-
game.world.
|
62 |
} else {
|
63 |
console.log(`Joining game`);
|
64 |
void joinInput(worldId);
|
|
|
58 |
console.log(`Leaving game for player ${userPlayerId}`);
|
59 |
void leave({ worldId , oauthToken});
|
60 |
console.log("game.world",game.world)
|
61 |
+
game.world.playersInit.delete(userPlayerId);
|
62 |
} else {
|
63 |
console.log(`Joining game`);
|
64 |
void joinInput(worldId);
|