lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
Showing only changes of commit e6d1d69241 - Show all commits

View File

@ -266,8 +266,15 @@ impl InstructionConsumer<Instruction<'_>> for Session{
self.view_state=ViewState::Replay(bot_id);
},
Instruction::Control(SessionControlInstruction::StopSpectate)=>{
let view_state=core::mem::replace(&mut self.view_state,ViewState::Play);
// delete the bot, otherwise it's inaccessible and wastes CPU
match view_state{
ViewState::Play=>(),
ViewState::Replay(bot_id)=>{
self.replays.remove(&bot_id);
},
}
_=self.simulation.timer.set_paused(ins.time,false);
self.view_state=ViewState::Play;
},
Instruction::Playback(_)=>{
println!("[session] todo: Playback instructions");