add extension for fractional EXP multipliers on BB

This commit is contained in:
Martin Michelsen
2025-09-21 13:16:28 -07:00
parent 4236ff62b1
commit 65384435a3
8 changed files with 88 additions and 16 deletions
+5 -1
View File
@@ -3261,7 +3261,11 @@ void send_set_exp_multiplier(shared_ptr<Lobby> l) {
if (!l->is_game()) {
throw logic_error("6xDD can only be sent in games (not in lobbies)");
}
G_SetEXPMultiplier_BB_6xDD cmd = {{0xDD, sizeof(G_SetEXPMultiplier_BB_6xDD) / 4, (l->mode == GameMode::CHALLENGE) ? 1 : l->base_exp_multiplier}};
G_SetFractionalEXPMultiplier_Extension_BB_6xDD cmd = {{0xDD, sizeof(G_SetEXPMultiplier_BB_6xDD) / 4, 1}, 1.0f};
if (l->mode != GameMode::CHALLENGE) {
cmd.header.param = l->base_exp_multiplier;
cmd.multiplier = l->base_exp_multiplier;
}
for (auto lc : l->clients) {
if (lc && (lc->version() == Version::BB_V4)) {
send_command_t(lc, 0x60, 0x00, cmd);