Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy2222 committed Jul 14, 2023
1 parent bc8e9f8 commit 75d0e9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crates/lobby/src/games/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ impl Games {
include_str!("init.sql"),
username_len = MAX_USERNAME_LEN,
game_name_len = MAX_GAME_NAME_LEN,
map_name_lenght = MAX_MAP_NAME_LEN,
map_hash_lenght = MAP_HASH_LEN,
map_name_len = MAX_MAP_NAME_LEN,
map_hash_len = MAP_HASH_LEN,
);

info!("Initializing games...");
Expand Down
4 changes: 2 additions & 2 deletions crates/lobby/src/games/init.sql
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CREATE TABLE IF NOT EXISTS games (
name CHARACTER({game_name_len}) NOT NULL PRIMARY KEY,
max_players TINYINT NOT NULL,
map_hash CHARACTER({map_hash_lenght}) NOT NULL,
map_name CHARACTER({map_name_lenght}) NOT NULL
map_hash CHARACTER({map_hash_len}) NOT NULL,
map_name CHARACTER({map_name_len}) NOT NULL
);

CREATE TABLE IF NOT EXISTS players (
Expand Down
10 changes: 5 additions & 5 deletions crates/pathing/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ impl ScheduledPath {
while self.current > 0 {
let segment_end = self.path.waypoints()[self.current - 1];
let remainder = segment_end - advancement;
let mut remainder_lenght = remainder.length();
let mut remainder_length = remainder.length();

if self.current == start {
remainder_lenght /= CURRENT_SEGMENT_BIAS;
remainder_length /= CURRENT_SEGMENT_BIAS;
}

if remainder_lenght > amount {
advancement += (amount / remainder_lenght) * remainder;
if remainder_length > amount {
advancement += (amount / remainder_length) * remainder;
break;
}

self.current -= 1;
advancement = segment_end;
amount -= remainder_lenght;
amount -= remainder_length;
}

advancement
Expand Down

0 comments on commit 75d0e9a

Please sign in to comment.