From 75d0e9a7725c3441ac2e0b8e970d807977f44314 Mon Sep 17 00:00:00 2001 From: Martin Indra Date: Fri, 14 Jul 2023 14:27:47 +0200 Subject: [PATCH] Fix typos --- crates/lobby/src/games/db.rs | 4 ++-- crates/lobby/src/games/init.sql | 4 ++-- crates/pathing/src/path.rs | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/lobby/src/games/db.rs b/crates/lobby/src/games/db.rs index 819c5175a..9c68420fb 100644 --- a/crates/lobby/src/games/db.rs +++ b/crates/lobby/src/games/db.rs @@ -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..."); diff --git a/crates/lobby/src/games/init.sql b/crates/lobby/src/games/init.sql index ac2fd3077..7283027c9 100644 --- a/crates/lobby/src/games/init.sql +++ b/crates/lobby/src/games/init.sql @@ -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 ( diff --git a/crates/pathing/src/path.rs b/crates/pathing/src/path.rs index 7737ea73e..45d05f137 100644 --- a/crates/pathing/src/path.rs +++ b/crates/pathing/src/path.rs @@ -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