diff options
-rw-r--r-- | src/client/infowidget.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/client/infowidget.cc b/src/client/infowidget.cc index 9340627..6dcb608 100644 --- a/src/client/infowidget.cc +++ b/src/client/infowidget.cc @@ -46,7 +46,6 @@ void DevInfoWidget::draw() { std::ostringstream textstream; const core::Entity *target = targets::current(); - float d = 0; textstream << "^Ncore ^B"; time_to_stream(textstream, core::application()->time()); @@ -58,19 +57,24 @@ void DevInfoWidget::draw() textstream << '\n'; if (core::localcontrol()) { + textstream << "^B" << core::localcontrol()->name() << '\n'; + textstream << "^Nthurst ^B" << std::fixed << std::setprecision(2) + << core::localcontrol()->thrust() << '\n'; + textstream << "^Nspeed ^B" << std::fixed << std::setprecision(2) + << core::localcontrol()->speed() << '\n'; textstream << "^Nx,y,z ^B" << std::fixed << std::setprecision(2) << core::localcontrol()->location().x() << ", " << core::localcontrol()->location().y() << ", " << core::localcontrol()->location().z() << '\n'; - textstream << "^Nradius ^B" << core::localcontrol()->radius() << '\n'; - textstream << "^Nthurst ^B" << core::localcontrol()->thrust() << " " - << "^Nspeed ^B" << core::localcontrol()->speed() << '\n'; - if (target) { - d = math::distance(core::localcontrol()->location(), target->location()) - target->radius() - core::localcontrol()->radius(); - textstream << "^Ndist ^B" << d << '\n'; + textstream << "^B" << target->name() << '\n'; + textstream << "^Nx,y,z ^B" << std::fixed << std::setprecision(2) + << target->location().x() << ", " + << target->location().y() << ", " + << target->location().z() << '\n'; + textstream << "^Nradius ^B" << target->radius() << '\n'; } } |