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/client.cc')
-rw-r--r--src/client/client.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 97c0128..85dec27 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -25,6 +25,7 @@ namespace client
core::Cvar *cl_framerate = 0;
//--- private definition ------------------------------------------
+
/// client application implementation
class Client : public core::Application
{
@@ -49,10 +50,8 @@ Client app;
void func_r_restart(std::stringstream &args)
{
video::shutdown();
- console::flush();
if (!video::init()) {
- console::flush();
app.quit(1);
}
}
@@ -87,6 +86,7 @@ void Client::init(int count, char **arguments)
// initialize core
core::Cvar::sv_dedicated = core::Cvar::set("sv_private", "0");
core::Application::init(count, arguments);
+ Console::init();
// client variables
core::Cvar *cvar = 0;
@@ -104,12 +104,10 @@ void Client::init(int count, char **arguments)
// Initialize the video subsystem
if (!video::init()) {
- console::flush();
quit(1);
}
// initialize console
- console::init();
chat::init();
// initialize input
@@ -128,6 +126,9 @@ void Client::run()
Uint32 client_framerate = (Uint32)(1000/120);
Uint32 elapsed = 0;
+ console()->flush();
+ console()->clear_notify();
+
while (true) {
Uint32 chrono = SDL_GetTicks();
@@ -155,24 +156,19 @@ void Client::run()
void Client::shutdown()
{
con_print << "^BShutting down client..." << std::endl;
- console::flush();
// remove engine functions
core::Func::remove("r_restart");
chat::shutdown();
- console::shutdown();
- console::flush();
+ Console::shutdown();
input::shutdown();
- console::flush();
video::shutdown();
- console::flush();
core::Application::shutdown();
- console::flush();
quit(0);
}