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-03-23 18:12:56 +0000
committerStijn Buys <ingar@osirion.org>2008-03-23 18:12:56 +0000
commit22e136d88817b64ec904a7e7232a2cf9e80e74bd (patch)
treeea369bba78930ff55325412760d14102d326f85b /src/client/view.cc
parent8485d43feca5597c4b412c6912aadcd9586e3cde (diff)
improved network connection handling, keep alive and time out
Diffstat (limited to 'src/client/view.cc')
-rw-r--r--src/client/view.cc13
1 files changed, 7 insertions, 6 deletions
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] == '*')