This commit is contained in:
2026-02-19 10:58:06 -08:00
parent 4877923655
commit 7e46184566
2 changed files with 10 additions and 6 deletions

View File

@@ -13,7 +13,6 @@ fn vector3_to_glam(v:&strafesnet_roblox_bot_file::v0::Vector3)->glam::Vec3{
/// A playback context. Advance time and then generate a camera position to pass to the renderer.
pub struct PlaybackHead{
//"Simulation"
head:Head,
offset:f64,
timer:Timer<Scaled<SessionTimeInner,PhysicsTimeInner>>,

View File

@@ -116,11 +116,16 @@ impl PlaybackState{
},
v0::RunEvent::Flag(run_event_flag)=>{
match run_event_flag.mode{
v0::ModeSpec::Exactly(mode_id)=>
if let Some(run)=self.runs.get_mut(&mode_id){
run.flag(run_event_flag.flag_reason);
v0::ModeSpec::Exactly(mode_id)=>{
if let Some(run)=self.runs.get_mut(&mode_id){
run.flag(run_event_flag.flag_reason);
}
},
v0::ModeSpec::All=>{
for run in self.runs.values_mut(){
run.flag(run_event_flag.flag_reason);
}
},
v0::ModeSpec::All=>self.runs.clear(),
v0::ModeSpec::Invalid=>{
for run in self.runs.values_mut(){
if run.is_invalid(){
@@ -166,7 +171,7 @@ impl PlaybackState{
},
}
}
pub fn process_event(&mut self,bot:&CompleteBot,event_type:v0::EventType,event_index:usize){
pub(crate) fn process_event(&mut self,bot:&CompleteBot,event_type:v0::EventType,event_index:usize){
match event_type{
v0::EventType::Input=>self.push_input(&bot.timelines().input_events[event_index].event),
v0::EventType::Output=>self.push_output(&bot.timelines().output_events[event_index].event),