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>2008-07-14 22:42:10 +0000
committerStijn Buys <ingar@osirion.org>2008-07-14 22:42:10 +0000
commitd10188594d789796fbc9f5c147aa999a2dc58725 (patch)
tree0ad90f7d2a303bdb8a3517a89bc8f3c195653cc6 /src/client
parentc297e7f00dc8dae522afe816365a282fae40d254 (diff)
fix camera position in track mode, fix z-buffer issues, added draw_location
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index c74c83e..fa96096 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -31,9 +31,11 @@ namespace client
core::Cvar *draw_ui = 0;
core::Cvar *draw_stats = 0;
-core::Cvar *cl_crosshaircolor = 0;
+core::Cvar *draw_location = 0;
core::Cvar *draw_radar = 0;
+core::Cvar *cl_crosshaircolor = 0;
+
namespace view
{
@@ -44,6 +46,9 @@ void init()
draw_stats = core::Cvar::get("draw_stats", "0", core::Cvar::Archive);
draw_stats->set_info("[bool] draw network and render statistics");
+ draw_location = core::Cvar::get("draw_location", "0", core::Cvar::Archive);
+ draw_location->set_info("[bool] draw world location");
+
draw_ui = core::Cvar::get("draw_ui", "1", core::Cvar::Archive);
draw_ui->set_info("[bool] draw the user interface");
@@ -178,6 +183,15 @@ void draw_status()
<< std::setprecision(2) << core::localcontrol()->speed();
Text::draw(4, video::height - Text::fontheight() -4, status);
+
+ if (draw_location->value()) {
+ std::stringstream location;
+ location << "^Nloc ^B" << std::fixed << std::setprecision(2) << std::setfill(' ') <<
+ std::setw(7) << core::localcontrol()->location().x << " " <<
+ std::setw(7) << core::localcontrol()->location().y << " " <<
+ std::setw(7) << core::localcontrol()->location().z;
+ Text::draw(4, video::height - Text::fontheight()*2 -4, location);
+ }
}
}