From a185c11f2397c0296a4b62cc266b4fa00a63c1e2 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 14 May 2008 21:07:10 +0000 Subject: console, camera & interpolation --- src/client/client.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/client/client.cc') 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); } -- cgit v1.2.3