pub fn step_simulation<BC: BlockContainer>(&mut self, input: &Input, dt: Duration, world: &BC) {
        let seconds_delta = dt.as_secs_f64();
        for (&id, input) in input.player_inputs.iter() {
            let player = self.players.entry(id).or_insert(Default::default());
            default_camera(player, *input, seconds_delta, world);
        }
        // Remove players that don't exist anymore
        self.players
            .retain(|id, _| input.player_inputs.contains_key(id));
    }
/// Step the full physics simulation.
/// For now, it just moves all connected players.
Step the full physics simulation.
For now, it just moves all connected players.
Step the full physics simulation . For now it just moves all connected players .
pub fn step_simulation<BC: BlockContainer>(&mut self, input: &Input, dt: Duration, world: &BC) {
        let seconds_delta = dt.as_secs_f64();
        for (&id, input) in input.player_inputs.iter() {
            let player = self.players.entry(id).or_insert(Default::default());
            default_camera(player, *input, seconds_delta, world);
        }
        // Remove players that don't exist anymore
        self.players
            .retain(|id, _| input.player_inputs.contains_key(id));
    }
pub fn step_simulation < BC : BlockContainer > ( & mut self , input : & Input , dt : Duration , world : & BC ) { let seconds_delta = dt . as_secs_f64 ( ) ; for ( & id , input ) in input . player_inputs . iter ( ) { let player = self . players . entry ( id ) . or_insert ( Default :: default ( ) ) ; default_camera ( player , * input , seconds_delta , world ) ; } // Remove players that don't exist anymore self . players . retain ( | id , _ | input . player_inputs . contains_key ( id ) ) ; }
Step the full physics simulation.
Step the full physics simulation .
&mut self
input
&Input
dt
Duration
world
&BC
&mut self
input
&Input
dt
Duration
world
&BC