Jofthomas commited on
Commit
ffca0c0
·
1 Parent(s): 5284598
Files changed (1) hide show
  1. src/components/Game.tsx +2 -2
src/components/Game.tsx CHANGED
@@ -92,7 +92,7 @@ export default function Game() {
92
 
93
  const scrollViewRef = useRef<HTMLDivElement>(null);
94
 
95
- const humanTokenIdentifier = useQuery(api.world.userStatus, worldId ? { worldId ,oauthToken} : 'skip');
96
  if (!worldId || !engineId || !game ) {
97
  return null;
98
  }
@@ -100,7 +100,7 @@ export default function Game() {
100
  console.log("game.playerDescriptions",game.playerDescriptions)
101
  console.log("game.world.players",game.world.players)
102
  const playerId = [...game.world.players.values()].find(
103
- (p) => game.playerDescriptions.get(p.id)?.name === humanTokenIdentifier,
104
  )?.id;
105
  console.log("playerId",playerId)
106
 
 
92
 
93
  const scrollViewRef = useRef<HTMLDivElement>(null);
94
 
95
+ const humanTokenIdentifier =oauthToken
96
  if (!worldId || !engineId || !game ) {
97
  return null;
98
  }
 
100
  console.log("game.playerDescriptions",game.playerDescriptions)
101
  console.log("game.world.players",game.world.players)
102
  const playerId = [...game.world.players.values()].find(
103
+ (p) => p.human === humanTokenIdentifier,
104
  )?.id;
105
  console.log("playerId",playerId)
106