From 40ea0e6c7d84c700cd34c6eca0e5cf7f460b1329 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 18 Jan 2025 01:31:45 -0800 Subject: [PATCH] rename last_instruction_id to next_instruction_id --- strafe-client/src/session.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/strafe-client/src/session.rs b/strafe-client/src/session.rs index b5b8ba3..17a0d7e 100644 --- a/strafe-client/src/session.rs +++ b/strafe-client/src/session.rs @@ -99,7 +99,7 @@ impl Recording{ } } pub struct Replay{ - last_instruction_id:usize, + next_instruction_id:usize, recording:Recording, simulation:Simulation, } @@ -109,7 +109,7 @@ impl Replay{ simulation:Simulation, )->Self{ Self{ - last_instruction_id:0, + next_instruction_id:0, recording, simulation, } @@ -117,16 +117,16 @@ impl Replay{ pub fn advance(&mut self,physics_data:&PhysicsData,time_limit:SessionTime){ let mut time=self.simulation.timer.time(time_limit); loop{ - if let Some(ins)=self.recording.instructions.get(self.last_instruction_id){ + if let Some(ins)=self.recording.instructions.get(self.next_instruction_id){ if ins.time> for Session{ let time=replay.simulation.timer.time(ins.time+SessionTime::from_secs(5)); replay.simulation.timer.set_time(ins.time,time); // resimulate the entire playback lol - replay.last_instruction_id=0; + replay.next_instruction_id=0; }, } },