diff --git a/play.pokemonshowdown.com/src/client-main.ts b/play.pokemonshowdown.com/src/client-main.ts index 5844bb0ee..12ddbcb6d 100644 --- a/play.pokemonshowdown.com/src/client-main.ts +++ b/play.pokemonshowdown.com/src/client-main.ts @@ -1155,7 +1155,7 @@ export class PSRoom extends PSStreamModel implements RoomOptions { const room = PS.rooms[roomid]; const battle = (room as BattleRoom)?.battle; - if (room?.type === "battle" && !battle.ended && battle.mySide.id === PS.user.userid) { + if (room?.type === "battle" && !battle.ended && battle.mySide.id === PS.user.userid && !battle.isReplay) { PS.join("forfeitbattle" as RoomID, { parentElem: elem }); return; } diff --git a/play.pokemonshowdown.com/src/panel-chat.tsx b/play.pokemonshowdown.com/src/panel-chat.tsx index 7c71e856c..91fbabbd6 100644 --- a/play.pokemonshowdown.com/src/panel-chat.tsx +++ b/play.pokemonshowdown.com/src/panel-chat.tsx @@ -438,6 +438,7 @@ export class ChatRoom extends PSRoom { 'play'() { if (!this.battle) return this.add('|error|You are not in a battle'); if (this.battle.atQueueEnd) { + if (this.battle.ended) this.battle.isReplay = true; this.battle.reset(); } this.battle.play();