Skip to content

Commit

Permalink
修复一键开火偶尔会出现问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperzlib committed Oct 23, 2024
1 parent 369f7db commit 3cfb8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/controllers/game/actions/GameFireAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class GameFireAction extends AbstractGameAction<GameFireActionConfig> {

if (config.strength) {
this.fireStrength = Math.min(config.strength, FIRE_MAX_STRENGTH);
const strength = this.game.strengthConfig.strength + this.fireStrength;
const strength = Math.min(this.game.strengthConfig.strength + this.fireStrength, this.game.clientStrength.limit);
this.game.setClientStrength(strength).catch((error) => {
console.error('Failed to set strength:', error);
});
Expand Down

0 comments on commit 3cfb8ac

Please sign in to comment.