Skip to content

Commit

Permalink
fix: indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gschup committed Oct 23, 2023
1 parent 81be1af commit fa7a7ac
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/ex_game/ex_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,12 @@ impl Game {
#[allow(dead_code)]
// creates a compact representation of currently pressed keys and serializes it
pub fn local_input(&mut self, handle: PlayerHandle) -> Input {

// manually teleport the player to the center of the screen, but not through a proper input
// this will create a forced desync (unless player one is already at the center)
if is_key_pressed(KeyCode::Space) {
self.game_state.positions[handle] = (WINDOW_WIDTH *0.5, WINDOW_HEIGHT * 0.5);
}
if is_key_pressed(KeyCode::Space) {
self.game_state.positions[handle] = (WINDOW_WIDTH * 0.5, WINDOW_HEIGHT * 0.5);
}

let mut inp: u8 = 0;

if handle == self.local_handles[0] {
Expand Down

0 comments on commit fa7a7ac

Please sign in to comment.