From d389a31f9816b55d8c7685ec24b9ab814252d693 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 28 Jul 2008 19:37:31 +0000 Subject: zone support --- src/client/view.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/client/view.cc') diff --git a/src/client/view.cc b/src/client/view.cc index eda5cf8..75c4989 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -92,15 +92,13 @@ void draw_status() { using namespace render; - // print the status in the upper left corner std::stringstream status; - if (core::game()) { int minutes = (int) floorf(core::game()->clientframetime() / 60.0f); int seconds = (int) floorf( core::game()->clientframetime() - (float) minutes* 60.0f); status << "^Ntime ^B" << std::setfill(' ') << std::setw(3) << minutes << ":" << std::setfill('0') << std::setw(2) << seconds; - Text::draw(video::width-Text::fontwidth()*11-4, 4+Text::fontheight(), status); + Text::draw(video::width-Text::fontwidth()*11-4, 4, status); } // print stats if desired @@ -113,7 +111,8 @@ void draw_status() } stats << "^Ntx ^B"<< std::setw(5) << (core::Stats::network_bytes_sent >> 10) << "\n"; stats << "^Nrx ^B"<< std::setw(5) << (core::Stats::network_bytes_received >> 10) << "\n"; - Text::draw(video::width-Text::fontwidth()*11-4, 4 + Text::fontheight()*3, stats); + + Text::draw(video::width-Text::fontwidth()*11-4, 4 + Text::fontheight()*2, stats); } // draw a basic HUD @@ -136,6 +135,10 @@ void draw_status() Text::draw(4, video::height - Text::fontheight()*2 -4, location); } + if (core::localplayer()->zone()) { + Text::draw(video::width - 4-Text::fontwidth()*24, video::height - Text::fontheight()*3 -4, core::localplayer()->zone()->name()); + } + core::Entity *entity = targets::current(); if (entity) { std::stringstream target; @@ -345,6 +348,8 @@ void frame(float seconds) // Clear the color and depth buffers. gl::clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + render::Stats::clear(); + if (core::application()->connected() && core::game()->serverframetime()) { render::draw(seconds); // draw the world targets::frame(); -- cgit v1.2.3