Spaces:
Sleeping
Sleeping
playersInit
Browse files
src/components/buttons/InteractButton.tsx
CHANGED
|
@@ -56,7 +56,7 @@ export default function InteractButton() {
|
|
| 56 |
}
|
| 57 |
if (isPlaying) {
|
| 58 |
console.log(`Leaving game for player ${userPlayerId}`);
|
| 59 |
-
|
| 60 |
console.log("game.world",game.world)
|
| 61 |
if (game.world.gameCycle.cycleState==="LobbyState"){
|
| 62 |
console.log("You are in the lobby and quitting",userPlayerId)
|
|
@@ -69,7 +69,7 @@ export default function InteractButton() {
|
|
| 69 |
}else{
|
| 70 |
game.world.players.delete(userPlayerId);
|
| 71 |
}
|
| 72 |
-
|
| 73 |
|
| 74 |
|
| 75 |
} else {
|
|
|
|
| 56 |
}
|
| 57 |
if (isPlaying) {
|
| 58 |
console.log(`Leaving game for player ${userPlayerId}`);
|
| 59 |
+
void leave({ worldId , oauthToken});
|
| 60 |
console.log("game.world",game.world)
|
| 61 |
if (game.world.gameCycle.cycleState==="LobbyState"){
|
| 62 |
console.log("You are in the lobby and quitting",userPlayerId)
|
|
|
|
| 69 |
}else{
|
| 70 |
game.world.players.delete(userPlayerId);
|
| 71 |
}
|
| 72 |
+
|
| 73 |
|
| 74 |
|
| 75 |
} else {
|