lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 9ba3484e25 - Show all commits

View File

@ -292,11 +292,15 @@ impl InstructionConsumer<Instruction<'_>> for Session{
Instruction::Control(SessionControlInstruction::SaveReplay)=>{
// Bind: N
let view_state=core::mem::replace(&mut self.view_state,ViewState::Play);
let file=std::fs::File::create(format!("{}.snfb",ins.time)).unwrap();
match view_state{
ViewState::Play=>(),
ViewState::Replay(bot_id)=>if let Some(replay)=self.replays.remove(&bot_id){
strafesnet_snf::bot::write_bot(std::io::BufWriter::new(file),replay.recording.instructions).unwrap();
let file_name=format!("replays/{}.snfb",ins.time);
std::thread::spawn(move ||{
std::fs::create_dir_all("replays").unwrap();
let file=std::fs::File::create(file_name).unwrap();
strafesnet_snf::bot::write_bot(std::io::BufWriter::new(file),replay.recording.instructions).unwrap();
});
},
}
_=self.simulation.timer.set_paused(ins.time,false);

1
tools/replays Symbolic link
View File

@ -0,0 +1 @@
/run/media/quat/Files/Documents/map-files/verify-scripts/replays