mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
stomp mods in netplay
This commit is contained in:
+3
-2
@@ -163,8 +163,9 @@ Generate & rebuild / prepare flows should point at the **`.cue`**, not a lone
|
||||
netplay.
|
||||
- **VERSION / lobby match pin:** peers should run the same release pin so
|
||||
generated code and protocol stay compatible.
|
||||
- **Mods:** netplay launches prefer a vanilla / synced mod plan (title-specific;
|
||||
see launcher `commit_netplay` hooks).
|
||||
- **Mods:** disabled for all netplay sessions (lobby / LAN / direct / rematch).
|
||||
Launcher `commit_netplay` and the runtime clear the in-session plan without
|
||||
touching the user's offline mod selection. Synced mod plans are deferred.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -434,7 +434,8 @@ Adaptive mid-match delay bumps are always on (no lobby disable).
|
||||
|
||||
### Tasks
|
||||
|
||||
- [x] Netplay clears mods (`mod_runtime_clear_for_netplay` / launcher hook)
|
||||
- [x] Netplay clears mods (`mod_runtime_clear_for_netplay` / launcher hook;
|
||||
main skips `mod_runtime_commit` when `net_cfg.enabled`)
|
||||
- [x] Same BIOS stem + disc identity on both peers (existing verify)
|
||||
- [x] Audit non-deterministic host clocks in sim path — **selfcheck-driven**
|
||||
(was soak-driven). `PSX_RB_SELFCHECK=1` (offline, single process,
|
||||
|
||||
@@ -19,7 +19,8 @@ bool mod_runtime_initialize(const std::filesystem::path& root,
|
||||
bool mod_runtime_commit(const std::filesystem::path& disc_path = {},
|
||||
std::string* error = nullptr);
|
||||
/* Drop the in-session mod plan for a netplay launch without rewriting the
|
||||
* user's persisted offline selection on disk. */
|
||||
* user's persisted offline selection on disk. Netplay is always vanilla for
|
||||
* now (no synced mod plans). */
|
||||
bool mod_runtime_clear_for_netplay(std::string* error = nullptr);
|
||||
const std::string& mod_runtime_fingerprint();
|
||||
const std::filesystem::path& mod_runtime_effective_disc_path();
|
||||
|
||||
+32
-1
@@ -10461,8 +10461,18 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
{
|
||||
/* Netplay must stay vanilla: launcher commit_netplay clears the plan,
|
||||
* but a following offline-style commit would re-resolve enabled mods
|
||||
* from disk. Skip commit entirely when this session is netplay. */
|
||||
std::string mod_error;
|
||||
if (!PSXRecompV4::mod_runtime_commit(resolved_disc, &mod_error)) {
|
||||
if (net_cfg.enabled) {
|
||||
if (!PSXRecompV4::mod_runtime_clear_for_netplay(&mod_error)) {
|
||||
std::fprintf(stderr,
|
||||
"psxrecomp: cannot clear mods for netplay: %s\n",
|
||||
mod_error.c_str());
|
||||
return 1;
|
||||
}
|
||||
} else if (!PSXRecompV4::mod_runtime_commit(resolved_disc, &mod_error)) {
|
||||
std::fprintf(stderr, "psxrecomp: cannot launch with selected mods: %s\n",
|
||||
mod_error.c_str());
|
||||
return 1;
|
||||
@@ -11864,6 +11874,27 @@ soft_return_lobby:
|
||||
default: g_video_aspect_num = 4; g_video_aspect_den = 3; break;
|
||||
}
|
||||
g_video_win_w = ls.window_width > 0 ? ls.window_width : g_video_win_w;
|
||||
{
|
||||
std::string mod_error;
|
||||
if (net_cfg.enabled) {
|
||||
if (!PSXRecompV4::mod_runtime_clear_for_netplay(&mod_error)) {
|
||||
std::fprintf(stderr,
|
||||
"psxrecomp: cannot clear mods for netplay "
|
||||
"rematch: %s\n",
|
||||
mod_error.c_str());
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
}
|
||||
} else if (!PSXRecompV4::mod_runtime_commit(resolved_disc,
|
||||
&mod_error)) {
|
||||
std::fprintf(stderr,
|
||||
"psxrecomp: cannot relaunch with selected "
|
||||
"mods: %s\n",
|
||||
mod_error.c_str());
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
std::printf("psxrecomp: rematch from lobby (netplay=%d)\n",
|
||||
net_cfg.enabled ? 1 : 0);
|
||||
std::fflush(stdout);
|
||||
|
||||
Reference in New Issue
Block a user