From 1525e4ecb2f6450b4467b8787d1283a34ca75e68 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 6 Aug 2008 21:03:54 +0000 Subject: joystick throttle/thruster control --- src/client/targets.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/targets.cc') diff --git a/src/client/targets.cc b/src/client/targets.cc index c0b8e77..1fc7ec9 100644 --- a/src/client/targets.cc +++ b/src/client/targets.cc @@ -386,7 +386,7 @@ void draw_entity_target(core::Entity *entity, bool is_active_target) std::stringstream strdistance; float d = math::distance(core::localcontrol()->location(), entity->state()->location()) - entity->radius() - core::localcontrol()->radius(); if (d > 0 ) { - if (d > 100) { + if (d > 100.0f) { strdistance << roundf(d * 0.1f) << "km"; } else { strdistance << roundf(d * 100.0f) << "m"; @@ -400,10 +400,10 @@ void draw_entity_target(core::Entity *entity, bool is_active_target) render::Text::setcolor('N'); } render::Text::draw(cx-aux::text_length(entity->name()) * render::Text::fontwidth()*0.5f, - cy-r-4- render::Text::fontheight(), entity->name()); + cy-r-4-render::Text::fontheight(), entity->name()); render::Text::draw(cx - aux::text_length(strdistance.str()) * render::Text::fontwidth() * 0.5f, - cy - render::Text::fontheight() * 0.5f, strdistance); + cy+r+4, strdistance); } } -- cgit v1.2.3