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) {
|
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
||||||
|
if ((patch_name != "PsoPeepsV2EXP5xDC") && (patch_name != "PsoPeepsV2EXP10xDC")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
||||||
} catch (const out_of_range&) {
|
} 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();
|
auto s = c->require_server_state();
|
||||||
unordered_set<shared_ptr<const ClientFunctionIndex::Function>> functions_to_send;
|
unordered_set<shared_ptr<const ClientFunctionIndex::Function>> functions_to_send;
|
||||||
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
||||||
|
if ((patch_name != "PsoPeepsV2EXP5xDC") && (patch_name != "PsoPeepsV2EXP10xDC")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
||||||
} catch (const out_of_range&) {
|
} 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()) {
|
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);
|
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();
|
auto s = c->require_server_state();
|
||||||
unordered_set<shared_ptr<const ClientFunctionIndex::Function>> functions_to_send;
|
unordered_set<shared_ptr<const ClientFunctionIndex::Function>> functions_to_send;
|
||||||
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
for (const auto& patch_name : c->login->account->auto_patches_enabled) {
|
||||||
|
if ((patch_name != "PsoPeepsV2EXP5xDC") && (patch_name != "PsoPeepsV2EXP10xDC")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
functions_to_send.emplace(s->client_functions->get(patch_name, c->specific_version));
|
||||||
} catch (const out_of_range&) {
|
} 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()) {
|
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);
|
co_await send_function_call_multi(c, functions_to_send);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ find_factor:
|
|||||||
cmpeq r0, r5
|
cmpeq r0, r5
|
||||||
bt factor_found
|
bt factor_found
|
||||||
add r6, 4
|
add r6, 4
|
||||||
dt r7
|
add r7, -1
|
||||||
bf find_factor
|
cmpgt r7, 0
|
||||||
|
bt find_factor
|
||||||
rets
|
rets
|
||||||
nop
|
nop
|
||||||
|
|
||||||
@@ -57,8 +58,9 @@ multiply_loop:
|
|||||||
sts macl, r0
|
sts macl, r0
|
||||||
mov.w [r4], r0
|
mov.w [r4], r0
|
||||||
add r4, r6
|
add r4, r6
|
||||||
dt r7
|
add r7, -1
|
||||||
bf multiply_loop
|
cmpgt r7, 0
|
||||||
|
bt multiply_loop
|
||||||
rets
|
rets
|
||||||
nop
|
nop
|
||||||
|
|
||||||
@@ -76,8 +78,9 @@ halve_loop:
|
|||||||
shlr r0
|
shlr r0
|
||||||
mov.w [r4], r0
|
mov.w [r4], r0
|
||||||
add r4, r6
|
add r4, r6
|
||||||
dt r7
|
add r7, -1
|
||||||
bf halve_loop
|
cmpgt r7, 0
|
||||||
|
bt halve_loop
|
||||||
rets
|
rets
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,9 @@ find_factor:
|
|||||||
cmpeq r0, r5
|
cmpeq r0, r5
|
||||||
bt factor_found
|
bt factor_found
|
||||||
add r6, 4
|
add r6, 4
|
||||||
dt r7
|
add r7, -1
|
||||||
bf find_factor
|
cmpgt r7, 0
|
||||||
|
bt find_factor
|
||||||
rets
|
rets
|
||||||
nop
|
nop
|
||||||
|
|
||||||
@@ -61,8 +62,9 @@ multiply_loop:
|
|||||||
sts macl, r0
|
sts macl, r0
|
||||||
mov.w [r4], r0
|
mov.w [r4], r0
|
||||||
add r4, r6
|
add r4, r6
|
||||||
dt r7
|
add r7, -1
|
||||||
bf multiply_loop
|
cmpgt r7, 0
|
||||||
|
bt multiply_loop
|
||||||
rets
|
rets
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user