From 6dc897c8747027a27aab8b5f47e605ea8cc6a287 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Wed, 8 Jul 2020 13:42:13 +0100 Subject: [PATCH] Commented unused but potentially useful code --- common/src/path.rs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/common/src/path.rs b/common/src/path.rs index b51bea7cb3..051d68846f 100644 --- a/common/src/path.rs +++ b/common/src/path.rs @@ -4,7 +4,6 @@ use crate::{ vol::{BaseVol, ReadVol}, }; use hashbrown::hash_map::DefaultHashBuilder; -use rand::{thread_rng, Rng}; use std::iter::FromIterator; use vek::*; @@ -349,23 +348,23 @@ where Vec3::new(0, 0, -1), // Downwards ]; - let walkable = [ - is_walkable(&(pos + Vec3::new(1, 0, 0))), - is_walkable(&(pos + Vec3::new(-1, 0, 0))), - is_walkable(&(pos + Vec3::new(0, 1, 0))), - is_walkable(&(pos + Vec3::new(0, -1, 0))), - ]; + // let walkable = [ + // is_walkable(&(pos + Vec3::new(1, 0, 0))), + // is_walkable(&(pos + Vec3::new(-1, 0, 0))), + // is_walkable(&(pos + Vec3::new(0, 1, 0))), + // is_walkable(&(pos + Vec3::new(0, -1, 0))), + // ]; - const DIAGONALS: [(Vec3, [usize; 2]); 8] = [ - (Vec3::new(1, 1, 0), [0, 2]), - (Vec3::new(-1, 1, 0), [1, 2]), - (Vec3::new(1, -1, 0), [0, 3]), - (Vec3::new(-1, -1, 0), [1, 3]), - (Vec3::new(1, 1, 1), [0, 2]), - (Vec3::new(-1, 1, 1), [1, 2]), - (Vec3::new(1, -1, 1), [0, 3]), - (Vec3::new(-1, -1, 1), [1, 3]), - ]; + // const DIAGONALS: [(Vec3, [usize; 2]); 8] = [ + // (Vec3::new(1, 1, 0), [0, 2]), + // (Vec3::new(-1, 1, 0), [1, 2]), + // (Vec3::new(1, -1, 0), [0, 3]), + // (Vec3::new(-1, -1, 0), [1, 3]), + // (Vec3::new(1, 1, 1), [0, 2]), + // (Vec3::new(-1, 1, 1), [1, 2]), + // (Vec3::new(1, -1, 1), [0, 3]), + // (Vec3::new(-1, -1, 1), [1, 3]), + // ]; DIRS.iter() .map(move |dir| (pos, dir))