Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/view.cc')
-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);
+ }
}
}