Skip to content

Commit

Permalink
Fix a bug related to viewing fog PvE games that used to be PvP games.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 9f5f6ba5f9df519630e624e3bcfbf94d6a40ae0b
  • Loading branch information
cpojer committed Nov 27, 2024
1 parent 98fe3a0 commit b21555f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion athena/lib/getFirstHumanPlayer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import MapData from '../MapData.tsx';

export default function getFirstHumanPlayer(map: MapData) {
return map.getPlayers().find((player) => player.isHumanPlayer());
return map.active.find((player) => map.getPlayer(player).isHumanPlayer());
}
2 changes: 1 addition & 1 deletion hera/lib/getClientViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function getClientViewer(
return (
currentViewer ||
(spectatorCodes?.length && spectatorCodeToPlayerID(spectatorCodes[0])) ||
(!isPvP(map) && getFirstHumanPlayer(map)?.id) ||
(!isPvP(map) && getFirstHumanPlayer(map)) ||
0
);
}

0 comments on commit b21555f

Please sign in to comment.