fix seek when paused
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use strafesnet_common::instruction::TimedInstruction;
|
||||
use strafesnet_common::session::Time as SessionTime;
|
||||
use strafesnet_common::timer::TimerState;
|
||||
use strafesnet_roblox_bot_player::{bot::CompleteBot,graphics::Graphics,head::{PlaybackHead,Time as PlaybackTime}};
|
||||
|
||||
pub enum SessionControlInstruction{
|
||||
@@ -57,11 +58,11 @@ impl<'a> PlayerWorker<'a>{
|
||||
self.playback_head.set_time(bot,ins.time,PlaybackTime::ZERO);
|
||||
},
|
||||
Instruction::SessionControl(SessionControlInstruction::SkipForward)=>if let Some(bot)=&self.bot{
|
||||
let head_time=self.playback_head.time(ins.time+SessionTime::from_secs(2));
|
||||
let head_time=self.playback_head.timer().clone().into_state().0.get_time(ins.time+SessionTime::from_secs(2));
|
||||
self.playback_head.set_time(bot,ins.time,head_time);
|
||||
},
|
||||
Instruction::SessionControl(SessionControlInstruction::SkipBack)=>if let Some(bot)=&self.bot{
|
||||
let head_time=self.playback_head.time(ins.time-SessionTime::from_secs(2));
|
||||
let head_time=self.playback_head.timer().clone().into_state().0.get_time(ins.time-SessionTime::from_secs(2));
|
||||
self.playback_head.set_time(bot,ins.time,head_time);
|
||||
},
|
||||
Instruction::SessionControl(SessionControlInstruction::DecreaseTimescale)=>{
|
||||
|
||||
Reference in New Issue
Block a user