mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-27 19:07:58 -05:00
If a player's left, the win timeout won't take longer than 60 seconds
This commit is contained in:
parent
352485c276
commit
7cb61d1fc8
5
app.js
5
app.js
|
|
@ -380,6 +380,11 @@ function Room(roomid, format, p1, p2, parentid, ranked)
|
|||
{
|
||||
waitTime = 30;
|
||||
}
|
||||
if (waitTime > 60 && (!selfR.battle.allySide.user || !selfR.battle.foeSide.user))
|
||||
{
|
||||
// if a player has left, don't wait longer than 60 seconds
|
||||
waitTime = 60;
|
||||
}
|
||||
selfR.battle.add('message Inactive players will '+action+' in '+waitTime+' seconds'+attrib+'.');
|
||||
selfR.update();
|
||||
selfR.resetTimer = setTimeout(selfR.kickInactive, waitTime*1000);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user