Change Threshold logic for Seeding

This commit is contained in:
Skillet 2023-02-13 08:53:47 -05:00 committed by GitHub
parent 28ceb0d2bc
commit 067ffc766d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,8 +105,9 @@ export default class DBLogPlayerTime extends DBLog {
{ where: { seedTime: null, joinedSeeding: 1, leaveTime: null, server: this.options.overrideServerID || this.server.id } } { where: { seedTime: null, joinedSeeding: 1, leaveTime: null, server: this.options.overrideServerID || this.server.id } }
); );
} }
this.seeding = info.a2sPlayerCount >= this.options.seedingThreshold ? false : true; if(seeding === true && info.a2sPlayerCount >= this.options.seedingThreshold) this.seeding = false;
else if(seeding === false && info.a2sPlayerCount-20 < this.options.seedingThreshold) this.seeding = true;
} }
async onPlayerConnected(info) { async onPlayerConnected(info) {