diff options
-rw-r--r-- | src/render/draw.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index b4fe5bd..84015e3 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -1455,6 +1455,7 @@ void draw_target(const core::Entity *entity) float d = math::distance(core::localcontrol()->location(), entity->location()) - entity->radius() - core::localcontrol()->radius(); if (d > core::range::fxdistance) return; + const float modelscale = entity->radius() / entity->model()->radius(); gl::enable(GL_DEPTH_TEST); gl::push(); @@ -1465,8 +1466,8 @@ void draw_target(const core::Entity *entity) for (model::Model::Docks::iterator dit = model->docks().begin(); dit != model->docks().end(); dit++) { model::Dock *dock = (*dit); - math::Vector3f maxbox(dock->location()); - math::Vector3f minbox(dock->location()); + math::Vector3f maxbox(dock->location() * modelscale); + math::Vector3f minbox(dock->location() * modelscale); for (size_t i = 0; i < 3; i++) { maxbox[i] += 0.025; |