Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index a737988..32f2971 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -121,9 +121,14 @@ void draw_entity_world_target(core::Entity *entity)
if (!model)
return;
+
if (!model->docks().size())
return;
+ float d = math::distance(core::localcontrol()->location(), entity->state()->location()) - entity->radius() - core::localcontrol()->radius();
+ if (d > 100.0f)
+ return;
+
gl::enable(GL_DEPTH_TEST);
gl::push();
gl::translate(entity->state()->location());
@@ -137,8 +142,8 @@ void draw_entity_world_target(core::Entity *entity)
math::Vector3f minbox(dock->location());
for (size_t i=0; i < 3; i++) {
- maxbox[i] += dock->radius();
- minbox[i] -= dock->radius();
+ maxbox[i] += 0.025;
+ minbox[i] -= 0.025;
}
// top