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-11-23 12:34:07 +0000
committerStijn Buys <ingar@osirion.org>2008-11-23 12:34:07 +0000
commit583ec3285c41e9d253c4aaabd2af4dadac75f3a7 (patch)
tree5ec345e44af9d3699a95f493d8358ee766e23330 /src/client/client.cc
parent44158ccfbe943b832c0e0bf9ce547212aa6c2b8b (diff)
clean module consturction/destruction
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 061f29b..650813c 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -17,6 +17,7 @@
#include "client/input.h"
#include "client/view.h"
#include "core/core.h"
+#include "core/loader.h"
#include "core/zone.h"
#include "render/render.h"
#include "ui/ui.h"
@@ -167,15 +168,21 @@ void Client::run()
void Client::frame(unsigned long timestamp)
{
+ input::frame();
+
core::Application::frame(timestamp);
- if (!core::application()->connected()) {
+ if (!connected()) {
+ std::string module_label(core::Loader::label());
+
// load the intro if nothing is running
- if (core::application()->load("intro")) {
- core::application()->connect("");
+ if (load("intro")) {
+ connect("");
+ if (module_label.size())
+ load(module_label);
}
// show the console if everything fails
- if (!core::application()->connected() && !ui::console()->visible()) {
+ if (!connected() && !ui::console()->visible()) {
ui::console()->toggle();
}
} else if (!ui::root()->active()) {
@@ -207,7 +214,7 @@ void Client::frame(unsigned long timestamp)
}
video::frame((float)(timestamp - previous_timestamp) / 1000.0f);
- input::frame();
+
previous_timestamp = timestamp;
}