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-28 19:37:31 +0000
committerStijn Buys <ingar@osirion.org>2008-07-28 19:37:31 +0000
commitd389a31f9816b55d8c7685ec24b9ab814252d693 (patch)
tree9b2577692e543fa6c59fcda508f92c3eb839ac7a /src/client/view.cc
parent17408276791033e8122819185abf3bcb01740105 (diff)
zone support
Diffstat (limited to 'src/client/view.cc')
-rw-r--r--src/client/view.cc13
1 files changed, 9 insertions, 4 deletions
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();