From d10188594d789796fbc9f5c147aa999a2dc58725 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 14 Jul 2008 22:42:10 +0000 Subject: fix camera position in track mode, fix z-buffer issues, added draw_location --- src/client/view.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/client') 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); + } } } -- cgit v1.2.3