From a7cee0f11b2581c1cc920bb4ba1d23a47d006266 Mon Sep 17 00:00:00 2001
From: anomaluridae <anomaluridaes@gmail.com>
Date: Tue, 14 Sep 2021 14:30:01 -0700
Subject: [PATCH] keep MAX_TARGET_RANGE within voxygen

---
 common/src/consts.rs                | 2 --
 voxygen/src/session/interactable.rs | 4 ++--
 voxygen/src/session/target.rs       | 5 ++++-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/common/src/consts.rs b/common/src/consts.rs
index 8bd4bbe1fe..48c0adfaac 100644
--- a/common/src/consts.rs
+++ b/common/src/consts.rs
@@ -1,8 +1,6 @@
 // The limit on distance between the entity and a collectible (squared)
 pub const MAX_PICKUP_RANGE: f32 = 5.0;
 pub const MAX_MOUNT_RANGE: f32 = 14.0;
-/// Max distance an entity can be "targeted"
-pub const MAX_TARGET_RANGE: f32 = 300.0;
 
 pub const GRAVITY: f32 = 25.0;
 pub const FRIC_GROUND: f32 = 0.15;
diff --git a/voxygen/src/session/interactable.rs b/voxygen/src/session/interactable.rs
index 6a4cbc9303..b2d8fee519 100644
--- a/voxygen/src/session/interactable.rs
+++ b/voxygen/src/session/interactable.rs
@@ -2,11 +2,11 @@ use ordered_float::OrderedFloat;
 use specs::{Join, WorldExt};
 use vek::*;
 
-use super::target::{self, Target};
+use super::target::{self, MAX_TARGET_RANGE, Target};
 use client::Client;
 use common::{
     comp,
-    consts::{MAX_PICKUP_RANGE, MAX_TARGET_RANGE},
+    consts::MAX_PICKUP_RANGE,
     terrain::Block,
     util::find_dist::{Cube, Cylinder, FindDist},
     vol::ReadVol,
diff --git a/voxygen/src/session/target.rs b/voxygen/src/session/target.rs
index d4551e011a..2c8a767cc5 100644
--- a/voxygen/src/session/target.rs
+++ b/voxygen/src/session/target.rs
@@ -5,7 +5,7 @@ use vek::*;
 use client::{self, Client};
 use common::{
     comp,
-    consts::{MAX_PICKUP_RANGE, MAX_TARGET_RANGE},
+    consts::MAX_PICKUP_RANGE,
     terrain::Block,
     util::find_dist::{Cylinder, FindDist},
     vol::ReadVol,
@@ -39,6 +39,9 @@ impl<T> Target<T> {
     pub fn position_int(self) -> Vec3<i32> { self.position.map(|p| p.floor() as i32) }
 }
 
+/// Max distance an entity can be "targeted"
+pub const MAX_TARGET_RANGE: f32 = 300.0;
+
 /// Calculate what the cursor is pointing at within the 3d scene
 #[allow(clippy::type_complexity)]
 pub(super) fn targets_under_cursor(