Fix Dreamcast V2 EXP resend behavior
This commit is contained in:
@@ -473,6 +473,9 @@ static asio::awaitable<void> send_auto_patches_if_needed(shared_ptr<Client> c) {
|
||||
}
|
||||
}
|
||||
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
||||
if ((patch_name != "PsoPeepsV2EXP5xDC") && (patch_name != "PsoPeepsV2EXP10xDC")) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
||||
} catch (const out_of_range&) {
|
||||
@@ -5504,6 +5507,9 @@ static asio::awaitable<void> on_6F(shared_ptr<Client> c, Channel::Message& msg)
|
||||
auto s = c->require_server_state();
|
||||
unordered_set<shared_ptr<const ClientFunctionIndex::Function>> functions_to_send;
|
||||
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
||||
if ((patch_name != "PsoPeepsV2EXP5xDC") && (patch_name != "PsoPeepsV2EXP10xDC")) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
||||
} catch (const out_of_range&) {
|
||||
@@ -5513,7 +5519,7 @@ static asio::awaitable<void> on_6F(shared_ptr<Client> c, Channel::Message& msg)
|
||||
}
|
||||
|
||||
if (!functions_to_send.empty()) {
|
||||
c->log.info_f("Resending {} selected patch-menu function(s) after loading", functions_to_send.size());
|
||||
c->log.info_f("Resending {} selected Dreamcast V2 EXP patch function(s) after loading", functions_to_send.size());
|
||||
co_await send_function_call_multi(c, functions_to_send);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,9 @@ static asio::awaitable<void> resend_selected_patch_menu_functions_after_dc_floor
|
||||
auto s = c->require_server_state();
|
||||
unordered_set<shared_ptr<const ClientFunctionIndex::Function>> functions_to_send;
|
||||
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
||||
if ((patch_name != "PsoPeepsV2EXP5xDC") && (patch_name != "PsoPeepsV2EXP10xDC")) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
||||
} catch (const out_of_range&) {
|
||||
@@ -110,7 +113,7 @@ static asio::awaitable<void> resend_selected_patch_menu_functions_after_dc_floor
|
||||
}
|
||||
|
||||
if (!functions_to_send.empty()) {
|
||||
c->log.info_f("Resending {} selected patch-menu function(s) after {}", functions_to_send.size(), reason);
|
||||
c->log.info_f("Resending {} selected Dreamcast V2 EXP patch function(s) after {}", functions_to_send.size(), reason);
|
||||
co_await send_function_call_multi(c, functions_to_send);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,9 @@ find_factor:
|
||||
cmpeq r0, r5
|
||||
bt factor_found
|
||||
add r6, 4
|
||||
dt r7
|
||||
bf find_factor
|
||||
add r7, -1
|
||||
cmpgt r7, 0
|
||||
bt find_factor
|
||||
rets
|
||||
nop
|
||||
|
||||
@@ -57,8 +58,9 @@ multiply_loop:
|
||||
sts macl, r0
|
||||
mov.w [r4], r0
|
||||
add r4, r6
|
||||
dt r7
|
||||
bf multiply_loop
|
||||
add r7, -1
|
||||
cmpgt r7, 0
|
||||
bt multiply_loop
|
||||
rets
|
||||
nop
|
||||
|
||||
@@ -76,8 +78,9 @@ halve_loop:
|
||||
shlr r0
|
||||
mov.w [r4], r0
|
||||
add r4, r6
|
||||
dt r7
|
||||
bf halve_loop
|
||||
add r7, -1
|
||||
cmpgt r7, 0
|
||||
bt halve_loop
|
||||
rets
|
||||
nop
|
||||
|
||||
|
||||
@@ -39,8 +39,9 @@ find_factor:
|
||||
cmpeq r0, r5
|
||||
bt factor_found
|
||||
add r6, 4
|
||||
dt r7
|
||||
bf find_factor
|
||||
add r7, -1
|
||||
cmpgt r7, 0
|
||||
bt find_factor
|
||||
rets
|
||||
nop
|
||||
|
||||
@@ -61,8 +62,9 @@ multiply_loop:
|
||||
sts macl, r0
|
||||
mov.w [r4], r0
|
||||
add r4, r6
|
||||
dt r7
|
||||
bf multiply_loop
|
||||
add r7, -1
|
||||
cmpgt r7, 0
|
||||
bt multiply_loop
|
||||
rets
|
||||
nop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user