mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Preact: Do not show forfeit popup for instant replay (#2486)
This commit is contained in:
parent
99c3f00133
commit
5a83c5dd9b
|
|
@ -1155,7 +1155,7 @@ export class PSRoom extends PSStreamModel<Args | null> 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user