Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/view.cc')
-rw-r--r--src/client/view.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 660930b..488a1cb 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -132,19 +132,18 @@ void draw_status()
gl::color(1.0f, 1.0f, 1.0f, 1.0f);
std::stringstream status;
- int hours = (int) sys::time() / 3600;
- int minutes = (int)(sys::time() - 3600*hours) / 60;
- int seconds = (int)(sys::time() - 3600*hours - 60 *minutes);
- status << "clock " << std::setfill('0') << std::setw(2) << hours << ":"
- << std::setfill('0') << std::setw(2) << minutes << ":"
- << std::setfill('0') << std::setw(2) << seconds;
-
- minutes = (int) floorf(core::application()->time() / 60.0f);
- seconds = (int) floorf(core::application()->time() - (float) minutes* 60.0f);
-
- status << " time " << std::setfill('0') << std::setw(2) << minutes << ":" << std::setfill('0') << std::setw(2) << seconds;
+ /*
+ int minutes = (int) floorf(core::application()->time() / 60.0f);
+ int seconds = (int) floorf(core::application()->time() - (float) minutes* 60.0f);
+ */
+
+ if (core::game()) {
+ int minutes = (int) floorf(core::game()->clientframetime() / 60.0f);
+ int seconds = (int) floorf( core::game()->clientframetime() - (float) minutes* 60.0f);
- draw_text(CHARWIDTH, 4, status);
+ status << " time " << std::setfill('0') << std::setw(2) << minutes << ":" << std::setfill('0') << std::setw(2) << seconds;
+ draw_text(CHARWIDTH, 4, status);
+ }
// print stats if desired
if (draw_stats && draw_stats->value()) {