diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/console.cc | 2 | ||||
-rw-r--r-- | src/client/view.cc | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/client/console.cc b/src/client/console.cc index fc53b09..67a6ac9 100644 --- a/src/client/console.cc +++ b/src/client/console.cc @@ -194,7 +194,7 @@ void flush() // save notification notify_text[notify_pos] = line; - notify_time[notify_pos] = sys::time(); + notify_time[notify_pos] = core::application()->time(); notify_pos = (notify_pos+1) % MAXNOTIFYLINES; // print to stdout diff --git a/src/client/view.cc b/src/client/view.cc index 5d14992..15b8606 100644 --- a/src/client/view.cc +++ b/src/client/view.cc @@ -146,10 +146,12 @@ void draw_status() // print stats if desired if (render::r_drawstats && render::r_drawstats->value()) { std::stringstream stats; - stats << "fps " << std::setw(6) << fps << "\n"; - stats << "tris " << std::setw(6) << render::Stats::tris << "\n"; - stats << "spheres " << std::setw(4) << render::Stats::spheres << "\n"; - draw_text(video::width-CHARWIDTH*13, CHARHEIGHT*3, stats); + stats << "fps " << std::setw(6) << fps << "\n"; + if (core::application()->connected()) { + stats << "tris " << std::setw(6) << render::Stats::tris << "\n"; + stats << "spheres " << std::setw(3) << render::Stats::spheres << "\n"; + } + draw_text(video::width-CHARWIDTH*12, CHARHEIGHT*2, stats); } // print the version number in the upper right corner @@ -161,10 +163,9 @@ void draw_status() // draw notifications gl::color(1.0f, 1.0f, 1.0f, 1.0f); size_t n = console::notify_pos % MAXNOTIFYLINES; - float now = sys::time(); int h = 4 + CHARHEIGHT; for (size_t l = 0; l < MAXNOTIFYLINES; l++) { - if (console::notify_text[n].size() > 2 && console::notify_time[n] + 4 > now) { + if (console::notify_text[n].size() > 2 && console::notify_time[n] + 4 > core::application()->time()) { if (console::notify_text[n][0] == '?') gl::color(0.7f,0.7f,0.7f, 1.0f); else if (console::notify_text[n][0] == '*') |