Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-13 23:51:05 +0000
committerStijn Buys <ingar@osirion.org>2010-11-13 23:51:05 +0000
commit41c3bee2b91c18a51d1b1f720d45d52bf0fbf89a (patch)
treea56504200e744bae878c988a8bfadb67136c9caa /src/client/infowidget.cc
parent67ad7c7e6438fc806a58e95071b78c7ab92328a9 (diff)
show target location and radius in client::DevInfoWidget
Diffstat (limited to 'src/client/infowidget.cc')
-rw-r--r--src/client/infowidget.cc18
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';
}
}