From aed1158264381c8a980419ae1e3958e96f1f5d92 Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Wed, 11 Nov 2026 13:09:13 +0000 Subject: [PATCH] remove rollback option (#1377) --- src/lib.rs | 1 - src/netplay.rs | 25 ++++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5fc8cd12..bac31783 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -255,7 +255,6 @@ pub fn run(args: Args, arg_count: usize) -> std::io::Result<()> { number_of_players, input_delay, ice_config_path: dirs.cache_dir.join("ice_config.json"), - rollback: false, }) } else { None diff --git a/src/netplay.rs b/src/netplay.rs index 2ff878ba..99033053 100644 --- a/src/netplay.rs +++ b/src/netplay.rs @@ -48,7 +48,6 @@ pub struct NetplayConfig { pub number_of_players: usize, pub input_delay: usize, pub ice_config_path: std::path::PathBuf, - pub rollback: bool, } pub struct Netplay { @@ -65,7 +64,6 @@ pub struct Netplay { pub requests: std::collections::VecDeque>, pub incoming_message: Vec, pub ice_config_path: std::path::PathBuf, - pub rollback: bool, } #[derive(serde::Serialize, serde::Deserialize)] @@ -274,9 +272,7 @@ pub fn process_requests( if let Some(request) = device.netplay.as_mut().unwrap().requests.pop_front() { match request { ggrs::GgrsRequest::SaveGameState { cell, frame } => { - if device.netplay.as_ref().unwrap().rollback { - savestates::create_savestate(device, true, Some(frame)); - } + //savestates::create_savestate(device, true, Some(frame)); let mut hasher = sha2::Sha256::new(); for reg in device.cpu.cop0.regs.as_ref() { @@ -345,9 +341,7 @@ fn process_netplay(device: &mut device::Device) { fn advance_frame(device: &mut device::Device) { let netplay = device.netplay.as_mut().unwrap(); - let local_input = if netplay.session.current_frame() > netplay.session.max_prediction() as i32 - || netplay.rollback - { + let local_input = if netplay.session.current_frame() > netplay.session.max_prediction() as i32 { ui::input::get(&mut device.ui, 0) } else { //workaround for disabled rollback @@ -359,14 +353,12 @@ fn advance_frame(device: &mut device::Device) { .add_local_input(local_handle, local_input) .unwrap(); - if !netplay.rollback { - // avoid rollback - while !netplay.disconnected - && netplay.session.current_frame() > netplay.session.confirmed_frame() - && netplay.session.confirmed_frame() != ggrs::NULL_FRAME - { - poll_clients(netplay); - } + // avoid rollback + while !netplay.disconnected + && netplay.session.current_frame() > netplay.session.confirmed_frame() + && netplay.session.confirmed_frame() != ggrs::NULL_FRAME + { + poll_clients(netplay); } if netplay.disconnected { @@ -579,7 +571,6 @@ pub fn init( received_data: std::collections::VecDeque::new(), messages: std::collections::HashMap::new(), ice_config_path: netplay_config.ice_config_path.clone(), - rollback: netplay_config.rollback, }) }