spawn on map change
This commit is contained in:
parent
c338826513
commit
80424cf24c
@ -1,3 +1,4 @@
|
||||
use strafesnet_common::gameplay_modes::{ModeId,StageId};
|
||||
use strafesnet_common::instruction::{InstructionConsumer,InstructionEmitter,InstructionFeedback,TimedInstruction};
|
||||
// session represents the non-hardware state of the client.
|
||||
// Ideally it is a deterministic state which is atomically updated by instructions, same as the simulation state.
|
||||
@ -159,7 +160,13 @@ impl InstructionConsumer<Instruction<'_>> for Session{
|
||||
// what if they pause for 5ms lmao
|
||||
_=self.simulation.timer.set_paused(ins.time,paused);
|
||||
}
|
||||
Instruction::ChangeMap(complete_map)=>self.change_map(complete_map),
|
||||
Instruction::ChangeMap(complete_map)=>{
|
||||
self.change_map(complete_map);
|
||||
// ResetAndSpawn
|
||||
run_mouse_interpolator_instruction!(MouseInterpolatorInstruction::Other(OtherInstruction::Mode(ModeInstruction::Reset)));
|
||||
run_mouse_interpolator_instruction!(MouseInterpolatorInstruction::Other(OtherInstruction::Other(OtherOtherInstruction::SetSensitivity(self.user_settings().calculate_sensitivity()))));
|
||||
run_mouse_interpolator_instruction!(MouseInterpolatorInstruction::Other(OtherInstruction::Mode(ModeInstruction::Spawn(ModeId::MAIN,StageId::FIRST))));
|
||||
},
|
||||
};
|
||||
// run all buffered instruction produced
|
||||
self.process_exhaustive(ins.time);
|
||||
|
Loading…
x
Reference in New Issue
Block a user