修改匹配的时间
This commit is contained in:
parent
ff12e937b1
commit
054e9307af
@ -72,13 +72,21 @@ export class RankedLobbyRoom extends Room {
|
||||
// * connection to the created room
|
||||
// */
|
||||
// cancelConfirmationAfter = 5000;
|
||||
maxDiffRatio = 1.2;
|
||||
/**
|
||||
* rank and group cache per-player
|
||||
*/
|
||||
stats: ClientStat[] = [];
|
||||
rank_mpa = 0.2;
|
||||
fair_ir = 1.2;
|
||||
step_ir = 1.3;
|
||||
|
||||
onCreate(options: any) {
|
||||
const fc = global.$cfg.get(BaseConst.FORMULA);
|
||||
this.rank_mpa = fc.get(70028).number / 100;
|
||||
this.fair_ir = fc.get(70029).number / 100 + 1;
|
||||
this.step_ir = fc.get(70031).number / 100 + 1;
|
||||
this.groupAddOneTime = fc.get(70023).number * 1000;
|
||||
this.maxWaitingTime = (fc.get(70024).number + fc.get(70025).number) * 1000;
|
||||
if (options.maxWaitingTime) {
|
||||
this.maxWaitingTime = options.maxWaitingTime;
|
||||
}
|
||||
@ -115,7 +123,6 @@ export class RankedLobbyRoom extends Room {
|
||||
* 如果找到的记录, clients已经查过2条, 则也插入一条记录
|
||||
* 如果找到的记录, clients是1, 则把当前client添加到该记录中, 同时更新rank
|
||||
*/
|
||||
const fc = global.$cfg.get(BaseConst.FORMULA);
|
||||
if (options.group) {
|
||||
let length = this.stats.length;
|
||||
let groupData;
|
||||
@ -149,7 +156,7 @@ export class RankedLobbyRoom extends Room {
|
||||
});
|
||||
} else {
|
||||
groupData.clients.set(client.sessionId, {client, options});
|
||||
groupData.rank = (groupData.rank + options.rank) / 2 * (1 + fc.get(70027).number / 100);
|
||||
groupData.rank = (groupData.rank + options.rank) / 2 * (1 + this.rank_mpa);
|
||||
}
|
||||
}
|
||||
client.send("clients", groupData.clients.size);
|
||||
@ -199,7 +206,7 @@ export class RankedLobbyRoom extends Room {
|
||||
/**
|
||||
* figure out how to identify the diff ratio that makes sense
|
||||
*/
|
||||
if (diffRatio > this.maxDiffRatio) {
|
||||
if (diffRatio > this.step_ir) {
|
||||
currentGroup = this.createGroup();
|
||||
totalRank = 0;
|
||||
}
|
||||
@ -262,7 +269,7 @@ export class RankedLobbyRoom extends Room {
|
||||
/**
|
||||
* figure out how to identify the diff ratio that makes sense
|
||||
*/
|
||||
if (diffRatio > this.maxDiffRatio) {
|
||||
if (diffRatio > this.fair_ir) {
|
||||
currentGroup = this.createGroup();
|
||||
totalRank = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user