This commit is contained in:
2026-02-23 06:56:42 -08:00
parent 87fa1220c6
commit cb7474522f
4 changed files with 4 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
use strafesnet_common::instruction::TimedInstruction;
use strafesnet_common::session::Time as SessionTime;
use strafesnet_common::physics::Time as PhysicsTime;
use strafesnet_roblox_bot_player::{bot::CompleteBot,graphics::Graphics,head::PlaybackHead};
pub enum SessionControlInstruction{
@@ -54,9 +55,7 @@ impl<'a> PlayerWorker<'a>{
self.playback_head.set_paused(ins.time,paused);
},
Instruction::SessionControl(SessionControlInstruction::Restart)=>{
if let Some(bot)=&self.bot{
self.playback_head.seek_to(ins.time,bot.time_base());
}
self.playback_head.seek_to(ins.time,PhysicsTime::ZERO);
},
Instruction::SessionControl(SessionControlInstruction::SkipForward)=>{
self.playback_head.seek_forward(SessionTime::from_secs(2));