diff --git a/client/src/dojo/contractModels.ts b/client/src/dojo/contractModels.ts index 34c69aa..2691b06 100644 --- a/client/src/dojo/contractModels.ts +++ b/client/src/dojo/contractModels.ts @@ -31,6 +31,9 @@ export function defineContractComponents(world: World) { combo_counter_in_tournament: RecsType.Number, max_combo_in_tournament: RecsType.Number, tournament_id: RecsType.Number, + // patch u8 -> u16 + combo_counter_2: RecsType.Number, + combo_counter_in_tournament_2: RecsType.Number, }, { metadata: { @@ -59,6 +62,8 @@ export function defineContractComponents(world: World) { "u8", "u8", "u64", + "u16", + "u16", ], customTypes: [], }, diff --git a/client/src/dojo/game/models/game.ts b/client/src/dojo/game/models/game.ts index 02f43a3..ddd2222 100644 --- a/client/src/dojo/game/models/game.ts +++ b/client/src/dojo/game/models/game.ts @@ -65,7 +65,7 @@ export class Game { this.hammer_used = game.hammer_used; this.wave_used = game.wave_used; this.totem_used = game.totem_used; - this.combo = game.combo_counter; + this.combo = Math.max(game.combo_counter, game.combo_counter_2); this.max_combo = game.max_combo; this.score = game.score; this.buyIn = 100; // Set default buy-in of $100 @@ -75,7 +75,10 @@ export class Game { this.seed = game.seed; this.start_time = new Date(game.start_time * 1000); this.score_in_tournament = game.score_in_tournament; - this.combo_counter_in_tournament = game.combo_counter_in_tournament; + this.combo_counter_in_tournament = Math.max( + game.combo_counter_in_tournament, + game.combo_counter_in_tournament_2, + ); this.max_combo_in_tournament = game.max_combo_in_tournament; this.tournament_id = game.tournament_id;