forked from StrafesNET/strafe-project
lol idk #1
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user