From 120ee6b6c0312c680f835ef8b67dddf0bf77840d Mon Sep 17 00:00:00 2001 From: tygyh <32486062+tygyh@users.noreply.github.com> Date: Fri, 15 Jul 2022 18:59:37 +0200 Subject: [PATCH] Fix typos --- client/src/lib.rs | 2 +- common/assets/src/lib.rs | 6 +++--- common/frontend/src/lib.rs | 2 +- common/net/src/msg/client.rs | 2 +- common/net/src/msg/compression.rs | 2 +- common/src/bin/asset_migrate.rs | 2 +- common/src/cmd.rs | 2 +- common/src/combat.rs | 6 +++--- common/src/comp/agent.rs | 4 ++-- common/src/comp/body.rs | 6 +++--- common/src/comp/controller.rs | 2 +- common/src/comp/fluid_dynamics.rs | 2 +- common/src/comp/inventory/loadout_builder.rs | 8 ++++---- common/src/generation.rs | 4 ++-- common/src/states/basic_summon.rs | 4 ++-- common/src/states/combo_melee.rs | 8 ++++---- common/src/states/dash_melee.rs | 2 +- common/src/terrain/block.rs | 2 +- common/systems/src/beam.rs | 2 +- common/systems/tests/phys/basic.rs | 4 ++-- network/protocol/src/frame.rs | 2 +- network/src/api.rs | 10 +++++----- network/src/channel.rs | 2 +- nix/README.md | 4 ++-- plugin/api/src/lib.rs | 2 +- plugin/rt/src/lib.rs | 2 +- server/src/client.rs | 6 +++--- server/src/cmd.rs | 10 +++++----- server/src/connection_handler.rs | 3 ++- server/src/events/entity_creation.rs | 2 +- server/src/events/group_manip.rs | 2 +- server/src/events/inventory_manip.rs | 4 ++-- server/src/events/invite.rs | 2 +- server/src/lib.rs | 2 +- server/src/persistence/json_models.rs | 2 +- server/src/rtsim/entity.rs | 2 +- server/src/settings/banlist.rs | 2 +- server/src/settings/editable.rs | 4 ++-- server/src/sys/agent.rs | 10 +++++----- server/src/sys/agent/attack.rs | 6 +++--- server/src/sys/agent/data.rs | 2 +- voxygen/anim/src/biped_large/idle.rs | 6 +++--- voxygen/anim/src/bird_large/dash.rs | 2 +- voxygen/i18n/src/analysis.rs | 6 +++--- voxygen/src/credits.rs | 4 ++-- voxygen/src/hud/buttons.rs | 2 +- voxygen/src/hud/chat.rs | 2 +- voxygen/src/hud/crafting.rs | 8 ++++---- voxygen/src/hud/map.rs | 2 +- voxygen/src/hud/settings_window/interface.rs | 2 +- voxygen/src/render/consts.rs | 2 +- voxygen/src/render/pipelines/bloom.rs | 2 +- voxygen/src/render/pipelines/debug.rs | 2 +- voxygen/src/render/renderer/drawer.rs | 6 +++--- voxygen/src/scene/camera.rs | 10 +++++----- voxygen/src/scene/debug.rs | 4 ++-- voxygen/src/scene/lod.rs | 2 +- world/examples/dungeon_voxel_export.rs | 2 +- world/src/canvas.rs | 2 +- world/src/sim/erosion.rs | 2 +- world/src/site2/plot/dungeon.rs | 4 ++-- 61 files changed, 113 insertions(+), 112 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 6fd6f35414..c1a1bec58f 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -162,7 +162,7 @@ impl WeatherLerp { self.old = mem::replace(&mut self.new, (weather, Instant::now())); } - // TODO: Make impprovements to this interpolation, it's main issue is assuming + // TODO: Make improvements to this interpolation, it's main issue is assuming // that updates come at regular intervals. fn update(&mut self, to_update: &mut WeatherGrid) { prof_span!("WeatherLerp::update"); diff --git a/common/assets/src/lib.rs b/common/assets/src/lib.rs index e009ff24ec..3c24f23e44 100644 --- a/common/assets/src/lib.rs +++ b/common/assets/src/lib.rs @@ -214,7 +214,7 @@ pub fn find_root() -> Option { if path.join(".git").exists() { return Some(path); } - // Search .git directory in parent directries + // Search .git directory in parent directories for ancestor in path.ancestors().take(10) { if ancestor.join(".git").exists() { return Some(ancestor.to_path_buf()); @@ -505,7 +505,7 @@ pub mod asset_tweak { } } - /// Convinient macro to quickly tweak value. + /// Convenient macro to quickly tweak value. /// /// Will use [Specifier]`::Tweak` specifier and call /// [tweak_expect] if passed only name @@ -556,7 +556,7 @@ pub mod asset_tweak { }}; } - /// Convinient macro to quickly tweak value from some existing path. + /// Convenient macro to quickly tweak value from some existing path. /// /// Will use [Specifier]`::Asset` specifier and call /// [tweak_expect] if passed only name diff --git a/common/frontend/src/lib.rs b/common/frontend/src/lib.rs index 921f8c279b..48a2860f2a 100644 --- a/common/frontend/src/lib.rs +++ b/common/frontend/src/lib.rs @@ -23,7 +23,7 @@ const RUST_LOG_ENV: &str = "RUST_LOG"; /// following in your environment. /// `RUST_LOG="veloren_voxygen=trace"` /// -/// more complex tracing can be done by concatenating with a `,` as seperator: +/// more complex tracing can be done by concatenating with a `,` as separator: /// - warn for `prometheus_hyper`, `dot_vox`, `gfx_device_gl::factory, /// `gfx_device_gl::shade` trace for `veloren_voxygen`, info for everything /// else diff --git a/common/net/src/msg/client.rs b/common/net/src/msg/client.rs index 9f310dd962..05efe1f407 100644 --- a/common/net/src/msg/client.rs +++ b/common/net/src/msg/client.rs @@ -31,7 +31,7 @@ pub enum ClientMsg { pub enum ClientType { /// Regular Client like Voxygen who plays the game Game, - /// A Chatonly client, which doesn't want to connect via its character + /// A Chat-only client, which doesn't want to connect via its character ChatOnly, /// A unprivileged bot, e.g. to request world information /// Or a privileged bot, e.g. to run admin commands used by server-cli diff --git a/common/net/src/msg/compression.rs b/common/net/src/msg/compression.rs index 2985c63f53..37760baaa0 100644 --- a/common/net/src/msg/compression.rs +++ b/common/net/src/msg/compression.rs @@ -76,7 +76,7 @@ pub trait PackingFormula: Copy { /// A wide, short image. Shares the advantage of not wasting space with /// TallPacking (which is strictly worse, and was moved to benchmark code in /// `world`), but faster to compress and smaller since PNG compresses each -/// row indepedently, so a wide image has fewer calls to the compressor. FLIP_X +/// row independently, so a wide image has fewer calls to the compressor. FLIP_X /// has the same spatial locality preserving behavior as with TallPacking. #[derive(Debug, Clone, Copy, Serialize, Deserialize)] pub struct WidePacking(); diff --git a/common/src/bin/asset_migrate.rs b/common/src/bin/asset_migrate.rs index e7d9503e6d..a881f431c0 100644 --- a/common/src/bin/asset_migrate.rs +++ b/common/src/bin/asset_migrate.rs @@ -7,7 +7,7 @@ use std::{ // If you want to migrate assets. // 1) Copy-paste old asset type to own module -// 2) Copy-pase new asset type to own module +// 2) Copy-paste new asset type to own module // (don't forget to add serde derive-s, import if needed) // 3) impl From for new asset. // 4) Reference old and new assets in old and new modules diff --git a/common/src/cmd.rs b/common/src/cmd.rs index 2d47ddda59..96aea26498 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -135,7 +135,7 @@ lazy_static! { pub static ref BUFF_PARSER: HashMap = { let string_from_buff = |kind| match kind { BuffKind::Burning => "burning", - BuffKind::Regeneration => "regeration", + BuffKind::Regeneration => "regeneration", BuffKind::Saturation => "saturation", BuffKind::Bleeding => "bleeding", BuffKind::Cursed => "cursed", diff --git a/common/src/combat.rs b/common/src/combat.rs index a3df0817cb..7fd95ca688 100644 --- a/common/src/combat.rs +++ b/common/src/combat.rs @@ -352,7 +352,7 @@ impl Attack { } }, CombatEffect::Lifesteal(l) => { - // Not modified by strength_modifer as damage already is + // Not modified by strength_modifier as damage already is if let Some(attacker_entity) = attacker.map(|a| a.entity) { let change = HealthChange { amount: applied_damage * l, @@ -499,7 +499,7 @@ impl Attack { } }, CombatEffect::Lifesteal(l) => { - // Not modified by strength_modifer as damage already is + // Not modified by strength_modifier as damage already is if let Some(attacker_entity) = attacker.map(|a| a.entity) { let change = HealthChange { amount: accumulated_damage * l, @@ -1162,7 +1162,7 @@ pub fn compute_crit_mult(inventory: Option<&Inventory>, msm: &MaterialStatManife }) } -/// Computes the energy reward modifer from worn armor +/// Computes the energy reward modifier from worn armor #[cfg(not(target_arch = "wasm32"))] pub fn compute_energy_reward_mod(inventory: Option<&Inventory>, msm: &MaterialStatManifest) -> f32 { // Starts with a value of 1.0 when summing the stats from each armor piece, and diff --git a/common/src/comp/agent.rs b/common/src/comp/agent.rs index 4653b7fb4a..b54e2c87d6 100644 --- a/common/src/comp/agent.rs +++ b/common/src/comp/agent.rs @@ -217,7 +217,7 @@ impl<'a> From<&'a Body> for Psyche { quadruped_small::Species::Goat => 0.5, quadruped_small::Species::Porcupine => 0.7, quadruped_small::Species::Turtle => 0.7, - // FIXME: This is to balance for enemy rats in dunegeons + // FIXME: This is to balance for enemy rats in dungeons // Normal rats should probably always flee. quadruped_small::Species::Rat => 0.0, quadruped_small::Species::Beaver => 0.7, @@ -546,7 +546,7 @@ impl Agent { self } - /// Makes agent aggresive without warning + /// Makes agent aggressive without warning #[must_use] pub fn with_aggro_no_warn(mut self) -> Self { self.psyche.aggro_dist = None; diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index b245699f07..c46b4d3d64 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -289,7 +289,7 @@ impl Body { Body::FishSmall(_) => 1.0, Body::Golem(_) => 10_000.0, Body::Humanoid(humanoid) => { - // Understand that chaning the mass values can have effects + // Understand that changing the mass values can have effects // on multiple systems. // // If you want to change that value, consult with @@ -568,8 +568,8 @@ impl Body { } } - // How far away other entities should try to be. Will be added uppon the other - // entitys spacing_radius. So an entity with 2.0 and an entity with 3.0 will + // How far away other entities should try to be. Will be added upon the other + // entity's spacing_radius. So an entity with 2.0 and an entity with 3.0 will // lead to that both entities will try to keep 5.0 units away from each // other. pub fn spacing_radius(&self) -> f32 { diff --git a/common/src/comp/controller.rs b/common/src/comp/controller.rs index 90373207e2..0a564593fa 100644 --- a/common/src/comp/controller.rs +++ b/common/src/comp/controller.rs @@ -131,7 +131,7 @@ pub enum UtteranceKind { Greeting, Scream, /* Death, - * TODO: Wait for more post-death features (i.e. animiations) before implementing death + * TODO: Wait for more post-death features (i.e. animations) before implementing death * sounds */ } diff --git a/common/src/comp/fluid_dynamics.rs b/common/src/comp/fluid_dynamics.rs index 7b4f688956..5c5bdc363a 100644 --- a/common/src/comp/fluid_dynamics.rs +++ b/common/src/comp/fluid_dynamics.rs @@ -138,7 +138,7 @@ impl Body { ) -> Vec3 { let v_sq = rel_flow.0.magnitude_squared(); if v_sq < 0.25 { - // don't bother with miniscule forces + // don't bother with minuscule forces Vec3::zero() } else { let rel_flow_dir = Dir::new(rel_flow.0 / v_sq.sqrt()); diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index 391cca1df5..1ccb2aef47 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -87,7 +87,7 @@ impl ItemSpec { .map(drop) .map_err(ValidationError::ItemAssetError), ItemSpec::Choice(choices) => { - // TODO: check for sanity of weigts? + // TODO: check for sanity of weights? for (_weight, choice) in choices { if let Some(item) = choice { item.validate()?; @@ -212,7 +212,7 @@ impl Base { /// If you want programing API of loadout creation, /// use `LoadoutBuilder` instead. /// -/// For examples of assets, see `assets/test/ladout/ok` folder. +/// For examples of assets, see `assets/test/loadout/ok` folder. #[derive(Debug, Deserialize, Clone, Default)] #[serde(deny_unknown_fields)] pub struct LoadoutSpec { @@ -1161,8 +1161,8 @@ mod tests { // Testing different species // - // Things that will be catched - invalid assets paths for - // creating default main hand tool or equipement without config + // Things that will be caught - invalid assets paths for + // creating default main hand tool or equipment without config #[test] fn test_loadout_species() { macro_rules! test_species { diff --git a/common/src/generation.rs b/common/src/generation.rs index 20f758cbd1..92609bb3f0 100644 --- a/common/src/generation.rs +++ b/common/src/generation.rs @@ -61,7 +61,7 @@ pub enum Meta { // that this field should be either Default or Unchanged // depending on how it is used. // -// When we will use exension manifests more, it would be nicer to +// When we will use extension manifests more, it would be nicer to // split EntityBase and EntityExtension to different structs. // // Fields which have Uninit enum kind @@ -69,7 +69,7 @@ pub enum Meta { // and required (or renamed to Default) in EntityBase /// Struct for EntityInfo manifest. /// -/// Intended to use with .ron files as base definion or +/// Intended to use with .ron files as base definition or /// in rare cases as extension manifest. /// Pure data struct, doesn't do anything until evaluated with EntityInfo. /// diff --git a/common/src/states/basic_summon.rs b/common/src/states/basic_summon.rs index ba77b32bd7..77a2553f9c 100644 --- a/common/src/states/basic_summon.rs +++ b/common/src/states/basic_summon.rs @@ -33,7 +33,7 @@ pub struct StaticData { pub recover_duration: Duration, /// How many creatures the state should summon pub summon_amount: u32, - /// Range of the summons relative to the summonner + /// Range of the summons relative to the summoner pub summon_distance: (f32, f32), /// Information about the summoned creature pub summon_info: SummonInfo, @@ -161,7 +161,7 @@ impl CharacterBehavior for Data { .cast() .0; - // If a duration is specified, create a projectile componenent for the npc + // If a duration is specified, create a projectile component for the npc let projectile = self.static_data.duration.map(|duration| Projectile { hit_solid: Vec::new(), hit_entity: Vec::new(), diff --git a/common/src/states/combo_melee.rs b/common/src/states/combo_melee.rs index ee6560fe24..1671b49690 100644 --- a/common/src/states/combo_melee.rs +++ b/common/src/states/combo_melee.rs @@ -173,7 +173,7 @@ impl CharacterBehavior for Data { .get(self.stage as usize - 1) .map_or(0, |_| self.stage as usize - 1); - let speed_modifer = 1.0 + let speed_modifier = 1.0 + self.static_data.max_speed_increase * (1.0 - self.static_data.speed_increase.powi(combo_counter as i32)); @@ -190,7 +190,7 @@ impl CharacterBehavior for Data { // Build up update.character = CharacterState::ComboMelee(Data { static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, Some(speed_modifer)), + timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), ..*self }); } else { @@ -315,7 +315,7 @@ impl CharacterBehavior for Data { // Swings update.character = CharacterState::ComboMelee(Data { static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, Some(speed_modifer)), + timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), ..*self }); } else { @@ -339,7 +339,7 @@ impl CharacterBehavior for Data { // Recovers update.character = CharacterState::ComboMelee(Data { static_data: self.static_data.clone(), - timer: tick_attack_or_default(data, self.timer, Some(speed_modifer)), + timer: tick_attack_or_default(data, self.timer, Some(speed_modifier)), ..*self }); } else { diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index 4e60de0de3..af9c8e0718 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -22,7 +22,7 @@ pub struct StaticData { pub buildup_duration: Duration, /// How long the state charges for until it reaches max damage pub charge_duration: Duration, - /// Suration of state spent in swing + /// Duration of state spent in swing pub swing_duration: Duration, /// How long the state has until exiting pub recover_duration: Duration, diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 71428c5088..f1224324e1 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -86,7 +86,7 @@ impl BlockKind { #[inline] pub const fn is_filled(&self) -> bool { !self.is_fluid() } - /// Determine whether the block has an RGB color storaged in the attribute + /// Determine whether the block has an RGB color stored in the attribute /// fields. #[inline] pub const fn has_color(&self) -> bool { self.is_filled() } diff --git a/common/systems/src/beam.rs b/common/systems/src/beam.rs index 70ab1962b5..1642ca7ee5 100644 --- a/common/systems/src/beam.rs +++ b/common/systems/src/beam.rs @@ -116,7 +116,7 @@ impl<'a> System<'a> for Sys { if frame_time <= 0.0 { return (server_events, add_hit_entities, outcomes); } - // Note: min() probably uneeded + // Note: min() probably unneeded let time_since_creation = (time - creation_time) as f32; let frame_start_dist = (beam_segment.speed * (time_since_creation - frame_time)).max(0.0); diff --git a/common/systems/tests/phys/basic.rs b/common/systems/tests/phys/basic.rs index c57dc03cbb..f4f6d963f3 100644 --- a/common/systems/tests/phys/basic.rs +++ b/common/systems/tests/phys/basic.rs @@ -86,7 +86,7 @@ fn fall_simple() -> Result<(), Box> { #[test] /// will fall in 20 x DT and 2 x 10*DT steps. compare the end result and make -/// log the "error" between both caluclation +/// log the "error" between both calculations fn fall_dt_speed_diff() -> Result<(), Box> { let mut sstate = utils::setup(); let mut fstate = utils::setup(); @@ -213,7 +213,7 @@ fn walk_max() -> Result<(), Box> { #[test] /// will run in 20 x DT and 2 x 10*DT steps. compare the end result and make -/// log the "error" between both caluclation +/// log the "error" between both calculations fn walk_dt_speed_diff() -> Result<(), Box> { let mut sstate = utils::setup(); let mut fstate = utils::setup(); diff --git a/network/protocol/src/frame.rs b/network/protocol/src/frame.rs index aa44af14ed..bcf548ca7f 100644 --- a/network/protocol/src/frame.rs +++ b/network/protocol/src/frame.rs @@ -461,7 +461,7 @@ mod tests { } #[test] - fn initframe_rubish() { + fn initframe_rubbish() { let mut buffer = BytesMut::from(&b"dtrgwcser"[..]); assert_eq!( InitFrame::read_frame(&mut buffer), diff --git a/network/src/api.rs b/network/src/api.rs index 511f90c361..9fb3526c3c 100644 --- a/network/src/api.rs +++ b/network/src/api.rs @@ -160,7 +160,7 @@ pub struct StreamParams { /// via their [`ConnectAddr`], or [`listen`] passively for [`connected`] /// [`Participants`] via [`ListenAddr`]. /// -/// Too guarantee a clean shutdown, the [`Runtime`] MUST NOT be droped before +/// Too guarantee a clean shutdown, the [`Runtime`] MUST NOT be dropped before /// the Network. /// /// # Examples @@ -516,7 +516,7 @@ impl Network { }; if let Ok(return_s) = return_s { if return_s.send(()).is_err() { - warn!("Network::drop stoped after a timeout and didn't wait for our shutdown"); + warn!("Network::drop stopped after a timeout and didn't wait for our shutdown"); }; } debug!("Network has shut down"); @@ -550,7 +550,7 @@ impl Participant { /// # Arguments /// * `prio` - defines which stream is processed first when limited on /// bandwidth. See [`Prio`] for documentation. - /// * `promises` - use a combination of you prefered [`Promises`], see the + /// * `promises` - use a combination of you preferred [`Promises`], see the /// link for further documentation. You can combine them, e.g. /// `Promises::ORDERED | Promises::CONSISTENCY` The Stream will then /// guarantee that those promises are met. @@ -1177,7 +1177,7 @@ where }, Err(TryRecvError::Closed) => panic!("{}{}", name, CHANNEL_ERR), Err(TryRecvError::Empty) => { - trace!("activly sleeping"); + trace!("actively sleeping"); cnt += 1; if cnt > 10 { error!("Timeout waiting for shutdown, dropping"); @@ -1222,7 +1222,7 @@ impl Drop for Participant { debug!("Shutting down Participant"); match self.a2s_disconnect_s.try_lock() { - Err(e) => debug!(?e, "Participant is beeing dropped by Network right now"), + Err(e) => debug!(?e, "Participant is being dropped by Network right now"), Ok(mut s) => match s.take() { None => info!("Participant already has been shutdown gracefully"), Some(a2s_disconnect_s) => { diff --git a/network/src/channel.rs b/network/src/channel.rs index 41650c58a0..e366432e87 100644 --- a/network/src/channel.rs +++ b/network/src/channel.rs @@ -623,7 +623,7 @@ impl UnreliableDrain for QuicDrain { match self.reliables.entry(sid) { Entry::Occupied(mut occupied) => occupied.get_mut().write_all(&data.data).await, Entry::Vacant(vacant) => { - // IF the buffer is empty this was created localy and WE are allowed to + // IF the buffer is empty this was created locally and WE are allowed to // open_bi(), if not, we NEED to block on sendstreams_r if data.data.is_empty() { let (mut sendstream, recvstream) = diff --git a/nix/README.md b/nix/README.md index 5ee218f80b..e4482b3e8d 100644 --- a/nix/README.md +++ b/nix/README.md @@ -8,7 +8,7 @@ We include instructions for Nix without flakes enabled, but using flakes is the See the [NixOS wiki](https://nixos.wiki/wiki/Flakes) for information on how to enable and use flakes. -It is recommended to first setup the [Cachix](https://cachix.org) cache to save time with builds: +It is recommended to first set up the [Cachix](https://cachix.org) cache to save time with builds: ```shell nix shell nixpkgs#cachix -c cachix use veloren-nix # or if you don't have flakes: @@ -16,7 +16,7 @@ nix-shell -p cachix --run "cachix use veloren-nix" ``` As this repository uses `git-lfs`, please make sure `git-lfs` is in your path. -If you have a locally cloned repo, you can make sure it is setup with: +If you have a locally cloned repo, you can make sure it is set up with: ```shell git lfs install --local && git lfs fetch && git lfs checkout ``` diff --git a/plugin/api/src/lib.rs b/plugin/api/src/lib.rs index b9562d0465..d859afa8c9 100644 --- a/plugin/api/src/lib.rs +++ b/plugin/api/src/lib.rs @@ -121,7 +121,7 @@ pub mod event { /// #[event_handler] /// pub fn on_command_testplugin(command: ChatCommandEvent) -> Result, String> { /// Ok(vec![format!( - /// "Player of id {:?} named {} with {:?} sended command with args {:?}", + /// "Player of id {:?} named {} with {:?} sent command with args {:?}", /// command.player.id, /// command /// .player diff --git a/plugin/rt/src/lib.rs b/plugin/rt/src/lib.rs index 31d3498b0d..3d2aa29443 100644 --- a/plugin/rt/src/lib.rs +++ b/plugin/rt/src/lib.rs @@ -100,7 +100,7 @@ static mut BUFFERS: Vec = Vec::new(); /// Allocate buffer from wasm linear memory /// # Safety -/// This function should never be used only intented to by used by the host +/// This function should never be used only intended to by used by the host #[no_mangle] pub unsafe fn wasm_prepare_buffer(size: i32) -> i64 { BUFFERS = vec![0u8; size as usize]; diff --git a/server/src/client.rs b/server/src/client.rs index 012c77efb0..cd665dd371 100644 --- a/server/src/client.rs +++ b/server/src/client.rs @@ -101,7 +101,7 @@ impl Client { | ServerGeneral::CharacterSuccess => { self.character_screen_stream.lock().unwrap().send(g) }, - //Ingame related + //In-game related ServerGeneral::GroupUpdate(_) | ServerGeneral::Invite { .. } | ServerGeneral::InvitePending(_) @@ -175,7 +175,7 @@ impl Client { | ServerGeneral::CharacterSuccess => { PreparedMsg::new(1, &g, &self.character_screen_stream_params) }, - //Ingame related + //In-game related ServerGeneral::GroupUpdate(_) | ServerGeneral::Invite { .. } | ServerGeneral::InvitePending(_) @@ -192,7 +192,7 @@ impl Client { | ServerGeneral::WeatherUpdate(_) => { PreparedMsg::new(2, &g, &self.in_game_stream_params) }, - //Ingame related, terrain + //In-game related, terrain ServerGeneral::TerrainChunkUpdate { .. } | ServerGeneral::LodZoneUpdate { .. } | ServerGeneral::TerrainBlockUpdates(_) => { diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 9d38922a36..e5838becf6 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -972,12 +972,12 @@ fn handle_time( // 'developer commentary' mode created by digging up the long-decayed // skeletons of the Veloren team, measuring various attributes of their // jawlines, and using them to recreate their voices. But how to go about - // this Herculean task? This code is jibberish! The last of the core Rust + // this Herculean task? This code is gibberish! The last of the core Rust // dev team died exactly 337,194 years ago! Rust is now a long-forgotten // dialect of the ancient ones, lost to the sands of time. Ashes to ashes, // dust to dust. When all hope is lost, one particularly intrepid // post-human hominid exployed by the 'Veloren Revival Corp' (no doubt we - // still won't have gotted rid of this blasted 'capitalism' thing by then) + // still won't have gotten rid of this blasted 'capitalism' thing by then) // might notice, after years of searching, a particularly curious // inscription within the code. The letters `D`, `A`, `Y`. Curious! She // consults the post-human hominid scholars of the old. Care to empathise @@ -986,7 +986,7 @@ fn handle_time( // 'day' in the post-human hominid language, which is of course universal. // Imagine also her surprise when, after much further translating, she // finds a comment predicting her very existence and her struggle to - // decode this great mystery. Rejoyce! The Veloren Revival Corp. may now + // decode this great mystery. Rejoice! The Veloren Revival Corp. may now // persist with their great Ultimate Edition DLC because the day period // might now be changed because they have found the constant that controls // it! Everybody was henceforth happy until the end of time. @@ -2778,7 +2778,7 @@ spawn_rate {:?} "#, server.notify_client(client, ServerGeneral::server_msg(ChatType::CommandInfo, s)); Ok(()) } else { - Err("Not a pregenerated chunk.".into()) + Err("Not a pre-generated chunk.".into()) } } @@ -3131,7 +3131,7 @@ fn handle_ban( .map(|duration| chrono::Duration::from_std(duration.into())) .transpose() .map_err(|err| format!("Error converting to duration: {}", err))? - // On overflow (someone adding some ridiculous timespan), just make the ban infinite. + // On overflow (someone adding some ridiculous time span), just make the ban infinite. .and_then(|duration| now.checked_add_signed(duration)); let ban_info = BanInfo { diff --git a/server/src/connection_handler.rs b/server/src/connection_handler.rs index 1f7bb553af..e2f9aa368c 100644 --- a/server/src/connection_handler.rs +++ b/server/src/connection_handler.rs @@ -68,7 +68,8 @@ impl ConnectionHandler { Some(Err(e)) => { error!( ?e, - "Stopping Conection Handler, no new connections can be made to server now!" + "Stopping Connection Handler, no new connections can be made to server \ + now!" ); break; }, diff --git a/server/src/events/entity_creation.rs b/server/src/events/entity_creation.rs index 0d03acc938..1524d3a517 100644 --- a/server/src/events/entity_creation.rs +++ b/server/src/events/entity_creation.rs @@ -131,7 +131,7 @@ pub fn handle_create_npc( .map(|g| (g, c)) }) .map(|(g, c)| { - // Might be unneccessary, but maybe pets can somehow have map + // Might be unnecessary, but maybe pets can somehow have map // markers in the future update_map_markers(&map_markers, &uids, c, &group_change); c.send_fallible(ServerGeneral::GroupUpdate(g)); diff --git a/server/src/events/group_manip.rs b/server/src/events/group_manip.rs index ba17a8ee1a..99e2f06cd1 100644 --- a/server/src/events/group_manip.rs +++ b/server/src/events/group_manip.rs @@ -222,7 +222,7 @@ pub fn handle_group(server: &mut Server, entity: Entity, manip: GroupManip) { "You were removed from the group.", )); } - // Tell kicker that they were succesful + // Tell kicker that they were successful if let Some(client) = clients.get(entity) { client.send_fallible(ServerGeneral::server_msg( ChatType::Meta, diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index 8c8f660808..70a806a731 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -504,7 +504,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv if let Some(pos) = ecs.read_storage::().get(entity) { let mut merged_stacks = false; - // If both slots have items and we're attemping to drag from one stack + // If both slots have items and we're attempting to drag from one stack // into another, stack the items. if let (Slot::Inventory(slot_a), Slot::Inventory(slot_b)) = (a, b) { merged_stacks |= inventory.merge_stack_into(slot_a, slot_b); @@ -538,7 +538,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv let ability_map = state.ecs().read_resource::(); let msm = state.ecs().read_resource::(); - // If both slots have items and we're attemping to split from one stack + // If both slots have items and we're attempting to split from one stack // into another, ensure that they are the same type of item. If they are // the same type do nothing, as you don't want to overwrite the existing item. diff --git a/server/src/events/invite.rs b/server/src/events/invite.rs index 0c5dbb6f78..227f38a925 100644 --- a/server/src/events/invite.rs +++ b/server/src/events/invite.rs @@ -113,7 +113,7 @@ pub fn handle_invite(server: &mut Server, inviter: Entity, invitee_uid: Uid, kin } let mut invite_sent = false; - // Returns true if insertion was succesful + // Returns true if insertion was successful let mut send_invite = || { match invites.insert(invitee, Invite { inviter, kind }) { Err(err) => { diff --git a/server/src/lib.rs b/server/src/lib.rs index aea6690e26..4aa7c134c0 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1385,7 +1385,7 @@ impl Server { let world_dims_chunks = self.world.sim().get_size(); let world_dims_blocks = TerrainChunkSize::blocks(world_dims_chunks); // NOTE: origin is in the corner of the map - // TODO: extend this function to have picking a random position or specifiying a + // TODO: extend this function to have picking a random position or specifying a // position as options //let mut rng = rand::thread_rng(); // // Pick a random position but not to close to the edge diff --git a/server/src/persistence/json_models.rs b/server/src/persistence/json_models.rs index 2dad458fe6..95bae90d0f 100644 --- a/server/src/persistence/json_models.rs +++ b/server/src/persistence/json_models.rs @@ -199,7 +199,7 @@ fn tool_kind_to_string(tool: Option) -> String { Some(Blowgun) => "Blowgun", Some(Pick) => "Pick", - // Toolkinds that are not anticipated to have many active aiblities (if any at all) + // Toolkinds that are not anticipated to have many active abilities (if any at all) Some(Farming) => "Farming", Some(Debug) => "Debug", Some(Natural) => "Natural", diff --git a/server/src/rtsim/entity.rs b/server/src/rtsim/entity.rs index 5ab0c90ee5..077d9c6628 100644 --- a/server/src/rtsim/entity.rs +++ b/server/src/rtsim/entity.rs @@ -47,7 +47,7 @@ const BIRD_MEDIUM_ROSTER: &[comp::bird_medium::Species] = &[ ]; const BIRD_LARGE_ROSTER: &[comp::bird_large::Species] = &[ - // Flame Wyvern not incuded until proper introduction + // Flame Wyvern not included until proper introduction comp::bird_large::Species::Phoenix, comp::bird_large::Species::Cockatrice, comp::bird_large::Species::Roc, diff --git a/server/src/settings/banlist.rs b/server/src/settings/banlist.rs index 4e7536afb4..1777b435a3 100644 --- a/server/src/settings/banlist.rs +++ b/server/src/settings/banlist.rs @@ -477,7 +477,7 @@ mod v1 { impl Banlist { /// Attempt to perform the ban action `action` for the user with UUID - /// `uuid` and username `username`, starting from itme `now` + /// `uuid` and username `username`, starting from time `now` /// (the information about the banning party will /// be in the `action` record), with a settings file maintained at path /// root `data_dir`. diff --git a/server/src/settings/editable.rs b/server/src/settings/editable.rs index 94b86ac158..4e9042b9a6 100644 --- a/server/src/settings/editable.rs +++ b/server/src/settings/editable.rs @@ -83,8 +83,8 @@ pub trait EditableSetting: Clone + Default { file.seek(SeekFrom::Start(0))?; ron::de::from_reader(file) .map(|legacy| Ok((Version::Old, Self::Legacy::into(legacy)))) - // When both legacy and nonlegacy have parse errors, prioritize the - // nonlegacy one, since we can't tell which one is "right" and legacy + // When both legacy and non-legacy have parse errors, prioritize the + // non-legacy one, since we can't tell which one is "right" and legacy // formats are simple, early, and uncommon enough that we expect // few parse errors in those. .or(Err(orig_err)) diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index e518c03a6b..99c3452f6c 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -157,7 +157,7 @@ impl<'a> System<'a> for Sys { // Default to looking in orientation direction // (can be overridden below) // - // This definetly breaks LeapMelee and + // This definitely breaks LeapMelee and // probably not only that, do we really need this at all? controller.reset(); controller.inputs.look_dir = ori.look_dir(); @@ -1359,7 +1359,7 @@ impl<'a> AgentData<'a> { let balance1: f32 = prices.balance(&pending.offers, &inventories, who, false); if balance0 >= balance1 { // If the trade is favourable to us, only send an accept message if we're - // not already accepting (since otherwise, spamclicking the accept button + // not already accepting (since otherwise, spam-clicking the accept button // results in lagging and moving to the review phase of an unfavorable trade // (although since the phase is included in the message, this shouldn't // result in fully accepting an unfavourable trade)) @@ -1614,8 +1614,8 @@ impl<'a> AgentData<'a> { }; let is_valid_target = |entity: EcsEntity| match read_data.bodies.get(entity) { Some(Body::ItemDrop(item)) => { - //If the agent is humanoid, it will pick up all kinds of itemdrops. If the - // agent isn't humanoid, it will pick up only consumable itemdrops. + //If the agent is humanoid, it will pick up all kinds of item drops. If the + // agent isn't humanoid, it will pick up only consumable item drops. let wants_pickup = matches!(self.body, Some(Body::Humanoid(_))) || matches!(item, item_drop::Body::Consumable); @@ -2174,7 +2174,7 @@ impl<'a> AgentData<'a> { let sound_pos = Pos(sound.pos); let dist_sqrd = self.pos.0.distance_squared(sound_pos.0); // NOTE: There is an implicit distance requirement given that sound volume - // disipates as it travels, but we will not want to flee if a sound is super + // dissipates as it travels, but we will not want to flee if a sound is super // loud but heard from a great distance, regardless of how loud it was. // `is_close` is this limiter. let is_close = dist_sqrd < 35.0_f32.powi(2); diff --git a/server/src/sys/agent/attack.rs b/server/src/sys/agent/attack.rs index 081e4f082c..e53f8b3cb4 100644 --- a/server/src/sys/agent/attack.rs +++ b/server/src/sys/agent/attack.rs @@ -1411,7 +1411,7 @@ impl<'a> AgentData<'a> { const MINION_SUMMON_THRESHOLD: f32 = 0.20; let health_fraction = self.health.map_or(0.5, |h| h.fraction()); // Sets counter at start of combat, using `condition` to keep track of whether - // it was already intitialized + // it was already initialized if !agent.action_state.condition { agent.action_state.counter = 1.0 - MINION_SUMMON_THRESHOLD; agent.action_state.condition = true; @@ -1742,7 +1742,7 @@ impl<'a> AgentData<'a> { && attack_data.angle < 90.0 && attack_data.in_min_range() { - // Triplestrike + // Triple strike controller.push_basic_input(InputKind::Secondary); agent.action_state.timer += read_data.dt.0; } else { @@ -2152,7 +2152,7 @@ impl<'a> AgentData<'a> { }; // Sets counter at start of combat, using `condition` to keep track of whether - // it was already intitialized + // it was already initialized if !agent.action_state.condition { agent.action_state.counter = 1.0 - MINION_SUMMON_THRESHOLD; agent.action_state.condition = true; diff --git a/server/src/sys/agent/data.rs b/server/src/sys/agent/data.rs index 0b2f41a632..6b2516d99d 100644 --- a/server/src/sys/agent/data.rs +++ b/server/src/sys/agent/data.rs @@ -71,7 +71,7 @@ impl AttackData { #[derive(Eq, PartialEq)] // When adding a new variant, first decide if it should instead fall under one -// of the pre-exisitng tactics +// of the pre-existing tactics pub enum Tactic { // General tactics SimpleMelee, diff --git a/voxygen/anim/src/biped_large/idle.rs b/voxygen/anim/src/biped_large/idle.rs index 18196eb150..ec1f471a32 100644 --- a/voxygen/anim/src/biped_large/idle.rs +++ b/voxygen/anim/src/biped_large/idle.rs @@ -46,11 +46,11 @@ impl Animation for IdleAnimation { let breathe = if s_a.beast { // Controls for the beast breathing let intensity = 0.04; - let lenght = 1.5; + let length = 1.5; let chop = 0.2; let chop_freq = 60.0; - intensity * (lenght * anim_time).sin() - + 0.05 * chop * (anim_time * chop_freq).sin() * (anim_time * lenght).cos() + intensity * (length * anim_time).sin() + + 0.05 * chop * (anim_time * chop_freq).sin() * (anim_time * length).cos() } else { 0.0 }; diff --git a/voxygen/anim/src/bird_large/dash.rs b/voxygen/anim/src/bird_large/dash.rs index 408d8cb7a6..aa9079e149 100644 --- a/voxygen/anim/src/bird_large/dash.rs +++ b/voxygen/anim/src/bird_large/dash.rs @@ -59,7 +59,7 @@ impl Animation for DashAnimation { let speedmult = 0.8; let lab: f32 = 0.6; //6 - // acc_vel and anim_time mix to make sure phase lenght isn't starting at + // acc_vel and anim_time mix to make sure phase length isn't starting at // +infinite let mixed_vel = acc_vel + anim_time * 5.0; //sets run frequency using speed, with anim_time setting a floor diff --git a/voxygen/i18n/src/analysis.rs b/voxygen/i18n/src/analysis.rs index 93150dbee6..9356166d74 100644 --- a/voxygen/i18n/src/analysis.rs +++ b/voxygen/i18n/src/analysis.rs @@ -53,12 +53,12 @@ fn compare_lang_with_reference( i18n_references: &RawLanguage, repo: &git2::Repository, ) { - // git graph decendent of is slow, so we cache it - let mut graph_decendent_of_cache = HashMap::new(); + // git graph descendant of is slow, so we cache it + let mut graph_descendant_of_cache = HashMap::new(); let mut cached_graph_descendant_of = |commit, ancestor| -> bool { let key = (commit, ancestor); - match graph_decendent_of_cache.entry(key) { + match graph_descendant_of_cache.entry(key) { Entry::Occupied(entry) => { return *entry.get(); }, diff --git a/voxygen/src/credits.rs b/voxygen/src/credits.rs index 975cd30b9d..2de5468781 100644 --- a/voxygen/src/credits.rs +++ b/voxygen/src/credits.rs @@ -35,7 +35,7 @@ pub struct Art { #[serde(default)] pub modifications: String, /// Any additional attribution notes that may be desired and/or required by - /// the respactive license that can't be conveyed or would be awkward to + /// the respective license that can't be conveyed or would be awkward to /// convey with the other provided fields. #[serde(default)] pub notes: String, @@ -45,7 +45,7 @@ pub struct Art { pub struct Contributor { pub name: String, /// Short note or description of the contributions - /// Optional, can be left empty/ommitted + /// Optional, can be left empty/omitted #[serde(default)] pub contributions: String, } diff --git a/voxygen/src/hud/buttons.rs b/voxygen/src/hud/buttons.rs index 7f56f33a04..542071a148 100644 --- a/voxygen/src/hud/buttons.rs +++ b/voxygen/src/hud/buttons.rs @@ -100,7 +100,7 @@ pub struct State { ids: Ids, } -#[allow(clippy::enum_variant_names)] //think about renaming to ToogleEvent +#[allow(clippy::enum_variant_names)] //think about renaming to ToggleEvent pub enum Event { ToggleBag, ToggleSettings, diff --git a/voxygen/src/hud/chat.rs b/voxygen/src/hud/chat.rs index e882705fe0..6cc6724541 100644 --- a/voxygen/src/hud/chat.rs +++ b/voxygen/src/hud/chat.rs @@ -883,7 +883,7 @@ mod tests { Ok(("say".to_string(), vec!["Hello World".to_string()])); assert_eq!(parse_cmd(r#"say "Hello World""#), expected); - // Note: \n in the exptected gets expanded by rust to a newline character, thats + // Note: \n in the expected gets expanded by rust to a newline character, that's // why we must not use a raw string in the expected let expected: Result<(String, Vec), String> = Ok(("say".to_string(), vec!["Hello\nWorld".to_string()])); diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 1254aed9bb..42d7442d88 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -274,14 +274,14 @@ pub struct State { enum SearchFilter { None, Input, - Nonexistant, + Nonexistent, } impl SearchFilter { fn parse_from_str(string: &str) -> Self { match string { "input" => Self::Input, - _ => Self::Nonexistant, + _ => Self::Nonexistent, } } } @@ -581,7 +581,7 @@ impl<'a> Widget for Crafting<'a> { }, } }), - SearchFilter::Nonexistant => false, + SearchFilter::Nonexistent => false, }) .map(|(name, recipe)| { let has_materials = self.client.available_recipes().get(name.as_str()).is_some(); @@ -612,7 +612,7 @@ impl<'a> Widget for Crafting<'a> { // TODO: Get input filtering to work here, probably requires // checking component recipe book? SearchFilter::Input => false, - SearchFilter::Nonexistant => false, + SearchFilter::Nonexistent => false, } }) .map(|(recipe_name, (recipe, _))| { diff --git a/voxygen/src/hud/map.rs b/voxygen/src/hud/map.rs index 1456e0e59c..3618dfd864 100644 --- a/voxygen/src/hud/map.rs +++ b/voxygen/src/hud/map.rs @@ -384,7 +384,7 @@ impl<'a> Widget for Map<'a> { } } - // Handle zooming with the mousewheel + // Handle zooming with the mouse wheel let scrolled: f64 = ui .widget_input(widget) .scrolls() diff --git a/voxygen/src/hud/settings_window/interface.rs b/voxygen/src/hud/settings_window/interface.rs index 72f1b869a0..5b2559c417 100644 --- a/voxygen/src/hud/settings_window/interface.rs +++ b/voxygen/src/hud/settings_window/interface.rs @@ -1125,7 +1125,7 @@ impl<'a> Widget for Interface<'a> { .color(TEXT_COLOR) .set(state.ids.experience_numbers_title, ui); - // Acuumulate Experience Gained + // Accumulate Experience Gained let accum_experience = ToggleButton::new( self.global_state.settings.interface.accum_experience, self.imgs.checkbox, diff --git a/voxygen/src/render/consts.rs b/voxygen/src/render/consts.rs index 3259c7d1aa..01a6161dbf 100644 --- a/voxygen/src/render/consts.rs +++ b/voxygen/src/render/consts.rs @@ -12,7 +12,7 @@ impl Consts { /// Create a new `Const`. pub fn new(device: &wgpu::Device, len: usize) -> Self { Self { - // TODO: examine if all our consts need to be updateable + // TODO: examine if all our consts need to be updatable buf: DynamicBuffer::new(device, len, wgpu::BufferUsage::UNIFORM), } } diff --git a/voxygen/src/render/pipelines/bloom.rs b/voxygen/src/render/pipelines/bloom.rs index 123f25680c..80be67b0f8 100644 --- a/voxygen/src/render/pipelines/bloom.rs +++ b/voxygen/src/render/pipelines/bloom.rs @@ -214,7 +214,7 @@ impl BloomPipelines { dst_factor: wgpu::BlendFactor::One, operation: wgpu::BlendOperation::Add, }, - // We don't reaaly use this but we need something here.. + // We don't really use this but we need something here.. alpha: wgpu::BlendComponent::REPLACE, }), ); diff --git a/voxygen/src/render/pipelines/debug.rs b/voxygen/src/render/pipelines/debug.rs index f35f49b320..3edde4ea29 100644 --- a/voxygen/src/render/pipelines/debug.rs +++ b/voxygen/src/render/pipelines/debug.rs @@ -31,7 +31,7 @@ impl VertexTrait for Vertex { #[repr(C)] #[derive(Copy, Clone, Debug, Zeroable, Pod)] pub struct Locals { - /// pos is [f32; 4] instead of [f32; 3] so that Locals's size is a multiple + /// pos is [f32; 4] instead of [f32; 3] so that Locals' size is a multiple /// of 8 bytes (which is required by gfx), the last component is ignored /// by the shader pub pos: [f32; 4], diff --git a/voxygen/src/render/renderer/drawer.rs b/voxygen/src/render/renderer/drawer.rs index 0abbc2e78e..2029b163ae 100644 --- a/voxygen/src/render/renderer/drawer.rs +++ b/voxygen/src/render/renderer/drawer.rs @@ -23,7 +23,7 @@ use {common_base::span, egui_wgpu_backend::ScreenDescriptor, egui_winit_platform enum Pipelines<'frame> { Interface(&'frame super::InterfacePipelines), All(&'frame super::Pipelines), - // Should never be in this state for now but we need this to accound for super::State::Nothing + // Should never be in this state for now but we need this to account for super::State::Nothing None, } @@ -53,7 +53,7 @@ impl<'frame> Pipelines<'frame> { } // Borrow the fields we need from the renderer so that the GpuProfiler can be -// disjointly borrowed mutably +// disjointedly borrowed mutably struct RendererBorrow<'frame> { queue: &'frame wgpu::Queue, device: &'frame wgpu::Device, @@ -371,7 +371,7 @@ impl<'frame> Drawer<'frame> { label, &bloom_pipelines.upsample, if index + 2 == bloom::NUM_SIZES { - // Clear for the final image since that is just stuff from the pervious frame. + // Clear for the final image since that is just stuff from the previous frame. wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT) } else { // Add to less blurred images to get gradient of blur instead of a smudge> diff --git a/voxygen/src/scene/camera.rs b/voxygen/src/scene/camera.rs index 9c11c59ff6..a81c6f2f6a 100644 --- a/voxygen/src/scene/camera.rs +++ b/voxygen/src/scene/camera.rs @@ -242,11 +242,11 @@ fn clamp_and_modulate(ori: Vec3) -> Vec3 { /// though the logic for why it should be okay to pass them directly is probably /// sound (they are both valid z values in the range, so gl_FragCoord.w will be /// assigned to this, meaning if they are imprecise enough then the whole -/// calculation will be similarly imprecies). +/// calculation will be similarly imprecise). /// /// TODO: Since it's a bit confusing that n and f are not always near and far, /// and a negative near plane can (probably) be emulated with simple actions on -/// the perspective matrix, consider removing this functionailty and replacing +/// the perspective matrix, consider removing this functionality and replacing /// our assertion with a single condition: `(1/far) * (1/near) < (1/near)²`. pub fn perspective_lh_zo_general( fov_y_radians: T, @@ -381,8 +381,8 @@ impl Camera { Vec3::new(0.0, 0.0, -1.0), Vec3::new(0.0, 0.0, 1.0), ]; - // Calculate new frustom location as there may have been lerp towards tgt_dist - // Without this, there will be camera jumpig back and forth in some scenarios + // Calculate new frustum location as there may have been lerp towards tgt_dist + // Without this, there will be camera jumping back and forth in some scenarios // TODO: Optimize and fix clipping still happening if self.dist << self.tgt_dist // Use tgt_dist, as otherwise we end up in loop due to dist depending on frustum @@ -703,7 +703,7 @@ impl Camera { /// Get the mode of the camera pub fn get_mode(&self) -> CameraMode { - // Perfom a bit of a trick... don't report first-person until the camera has + // Perform a bit of a trick... don't report first-person until the camera has // lerped close enough to the player. match self.mode { CameraMode::FirstPerson if self.dist < 0.5 => CameraMode::FirstPerson, diff --git a/voxygen/src/scene/debug.rs b/voxygen/src/scene/debug.rs index c177fec6dd..70e3c2f241 100644 --- a/voxygen/src/scene/debug.rs +++ b/voxygen/src/scene/debug.rs @@ -111,8 +111,8 @@ impl DebugShape { // stretch to radius let a = a * *radius; // rotate to 90 degrees to get needed shift - let ortoghonal = Quaternion::rotation_z(PI / 2.0); - let shift = ortoghonal * a; + let orthogonal = Quaternion::rotation_z(PI / 2.0); + let shift = orthogonal * a; // bottom points let a0 = p0 + shift; diff --git a/voxygen/src/scene/lod.rs b/voxygen/src/scene/lod.rs index dddfb0bcfd..dc7044a8b1 100644 --- a/voxygen/src/scene/lod.rs +++ b/voxygen/src/scene/lod.rs @@ -152,7 +152,7 @@ impl Lod { self.zone_objects .retain(|p, _| client.lod_zones().contains_key(p)); - // Determine visiblity of zones based on view frustum + // Determine visibility of zones based on view frustum let camera::Dependents { view_mat, proj_mat_treeculler, diff --git a/world/examples/dungeon_voxel_export.rs b/world/examples/dungeon_voxel_export.rs index 9fd18f21b7..3bf0f597b0 100644 --- a/world/examples/dungeon_voxel_export.rs +++ b/world/examples/dungeon_voxel_export.rs @@ -98,7 +98,7 @@ impl ExportVol { // File format defined at https://github.com/ephtracy/voxel-model fn write_i32(file: &mut File, value: i32) -> Result { - // The spec doesn't specify endianess?!? + // The spec doesn't specify endianness?!? file.write_all(&value.to_le_bytes()) } diff --git a/world/src/canvas.rs b/world/src/canvas.rs index 670d312fe5..ab6acbda3a 100644 --- a/world/src/canvas.rs +++ b/world/src/canvas.rs @@ -198,7 +198,7 @@ impl<'a> Canvas<'a> { /// Blit a structure on to the canvas at the given position. /// - /// Note that this function should be called with identitical parameters by + /// Note that this function should be called with identical parameters by /// all chunks within the bounds of the structure to avoid cut-offs /// occurring at chunk borders. Deterministic RNG is advised! pub fn blit_structure( diff --git a/world/src/sim/erosion.rs b/world/src/sim/erosion.rs index c68c1d63fb..3cb0cf4e7f 100644 --- a/world/src/sim/erosion.rs +++ b/world/src/sim/erosion.rs @@ -1119,7 +1119,7 @@ fn erode( }, ); debug!( - "(Done precomputation, time={:?}ms).", + "(Done pre-computation, time={:?}ms).", start_time.elapsed().as_millis() ); #[rustfmt::skip] diff --git a/world/src/site2/plot/dungeon.rs b/world/src/site2/plot/dungeon.rs index 4395bef75b..2d448f0910 100644 --- a/world/src/site2/plot/dungeon.rs +++ b/world/src/site2/plot/dungeon.rs @@ -1331,7 +1331,7 @@ impl Floor { sprites.push((floor_sprite, floor_sprite_fill.clone())); } - // Place a glowing purple septagonal star inscribed in a circle in the boss room + // Place a glowing purple heptagonal star inscribed in a circle in the boss room if let Some(boss_room_center) = boss_room_center { let magic_circle_bb = painter.prim(Primitive::Cylinder(Aabb { min: (boss_room_center - 3 * Vec2::broadcast(TILE_SIZE) / 2).with_z(floor_z - 1), @@ -1346,7 +1346,7 @@ impl Floor { // Place pillars and pillar lights facing the pillars for (pos, pillar, lights) in pillars.iter() { - // Avoid placing pillars that would cover the septagonal star + // Avoid placing pillars that would cover the heptagonal star if let Some(boss_room_center) = boss_room_center { if pos.distance_squared(boss_room_center) < (3 * TILE_SIZE / 2).pow(2) { continue;