Skip to content

Commit

Permalink
fix compute game ondispose with bots (#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainpolletvillard authored Apr 9, 2024
1 parent 0ae0e8c commit fb161b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/public/src/pages/component/after/after-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Synergy } from "../../../../../types/enum/Synergy"
import { useAppSelector } from "../../../hooks"
import SynergyIcon from "../icons/synergy-icon"
import { Avatar } from "../profile/avatar"
import "./after-menu.css"
import Team from "./team"
import "./after-menu.css"

export default function AfterMenu() {
const { t } = useTranslation()
Expand Down
2 changes: 1 addition & 1 deletion app/rooms/game-room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export default class GameRoom extends Room<GameState> {

async onDispose() {
const numberOfPlayersAlive = values(this.state.players).filter(
(p) => p.alive
(p) => p.alive && !p.isBot
).length
if (numberOfPlayersAlive > 1) {
logger.warn(
Expand Down

0 comments on commit fb161b2

Please sign in to comment.