Commit ccb8c97c authored by nanahira's avatar nanahira

fix ready timeout again

parent ab194281
Pipeline #43336 passed with stages
in 3 minutes and 37 seconds
...@@ -201,7 +201,7 @@ export class RandomDuelProvider { ...@@ -201,7 +201,7 @@ export class RandomDuelProvider {
this.registerRandomRoomModes(); this.registerRandomRoomModes();
this.waitForPlayerProvider.registerTick({ this.waitForPlayerProvider.registerTick({
roomFilter: (room) => !!room.randomType, roomFilter: (room) => !!room.randomType,
raadyTimeoutMs: this.waitForPlayerReadyTimeoutMs, readyTimeoutMs: this.waitForPlayerReadyTimeoutMs,
hangTimeoutMs: this.waitForPlayerHangTimeoutMs, hangTimeoutMs: this.waitForPlayerHangTimeoutMs,
longAgoBackoffMs: this.waitForPlayerLongAgoBackoffMs, longAgoBackoffMs: this.waitForPlayerLongAgoBackoffMs,
}); });
......
...@@ -25,7 +25,7 @@ import { PlayerName } from '../utility'; ...@@ -25,7 +25,7 @@ import { PlayerName } from '../utility';
export interface WaitForPlayerConfig { export interface WaitForPlayerConfig {
roomFilter: (room: Room) => boolean; roomFilter: (room: Room) => boolean;
raadyTimeoutMs?: number; readyTimeoutMs?: number;
hangTimeoutMs?: number; hangTimeoutMs?: number;
longAgoBackoffMs: number; longAgoBackoffMs: number;
} }
...@@ -246,7 +246,7 @@ export class WaitForPlayerProvider { ...@@ -246,7 +246,7 @@ export class WaitForPlayerProvider {
registerTick(options: WaitForPlayerConfig) { registerTick(options: WaitForPlayerConfig) {
const runtimeOptions: Required<WaitForPlayerConfig> = { const runtimeOptions: Required<WaitForPlayerConfig> = {
roomFilter: options.roomFilter, roomFilter: options.roomFilter,
raadyTimeoutMs: Math.max(0, options.raadyTimeoutMs || 0), readyTimeoutMs: Math.max(0, options.readyTimeoutMs || 0),
hangTimeoutMs: Math.max(0, options.hangTimeoutMs || 0), hangTimeoutMs: Math.max(0, options.hangTimeoutMs || 0),
longAgoBackoffMs: Math.max(0, options.longAgoBackoffMs || 0), longAgoBackoffMs: Math.max(0, options.longAgoBackoffMs || 0),
}; };
...@@ -358,9 +358,8 @@ export class WaitForPlayerProvider { ...@@ -358,9 +358,8 @@ export class WaitForPlayerProvider {
nowMs: number, nowMs: number,
) { ) {
if ( if (
runtime.options.raadyTimeoutMs <= 0 || runtime.options.readyTimeoutMs <= 0 ||
room.duelStage !== DuelStage.Begin || room.duelStage !== DuelStage.Begin
this.getDisconnectedCount(room) > 0
) { ) {
this.clearReadyState(room); this.clearReadyState(room);
return; return;
...@@ -375,7 +374,7 @@ export class WaitForPlayerProvider { ...@@ -375,7 +374,7 @@ export class WaitForPlayerProvider {
if (room.waitForPlayerReadyTargetPos !== target.pos) { if (room.waitForPlayerReadyTargetPos !== target.pos) {
room.waitForPlayerReadyTargetPos = target.pos; room.waitForPlayerReadyTargetPos = target.pos;
room.waitForPlayerReadyDeadlineMs = room.waitForPlayerReadyDeadlineMs =
nowMs + runtime.options.raadyTimeoutMs; nowMs + runtime.options.readyTimeoutMs;
room.waitForPlayerReadyWarnRemain = undefined; room.waitForPlayerReadyWarnRemain = undefined;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment