Skip to content

Commit

Permalink
修复B通道可能超出上限的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperzlib committed Aug 30, 2024
1 parent 2774081 commit 41337f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/controllers/game/CoyoteLiveGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ export class CoyoteLiveGame {

await this.client.setStrength(Channel.A, strength);
if (this.strengthConfig.bChannelMultiplier) {
await this.client.setStrength(Channel.B, strength * this.strengthConfig.bChannelMultiplier);
let bStrength = Math.min(strength * this.strengthConfig.bChannelMultiplier, this.clientStrength.limit);
await this.client.setStrength(Channel.B, bStrength);
}
}

Expand Down

0 comments on commit 41337f0

Please sign in to comment.