diff options
| author | oy <Tom_Adams@web.de> | 2010-08-07 20:22:25 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-08-07 20:22:25 +0200 |
| commit | ad9b32b7417d0837c485b6c9b802cc90aa51c521 (patch) | |
| tree | fb2c0cd8d68f58bbbd1e0d895cb82086ea824fe7 /src/engine/client | |
| parent | 3f0ff1fb1404efcb312a6bfcef0beb4b6a0d92ef (diff) | |
| download | zcatch-ad9b32b7417d0837c485b6c9b802cc90aa51c521.tar.gz zcatch-ad9b32b7417d0837c485b6c9b802cc90aa51c521.zip | |
added the possibility to store commands within the console and execute them later on when everything is initialised correctly - fixes several possible startup crashes and the "Support bans in server configuration"-ticket
Diffstat (limited to 'src/engine/client')
| -rw-r--r-- | src/engine/client/client.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 90bb70d3..4ab8ee60 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1613,6 +1613,9 @@ void CClient::Run() Input()->MouseModeRelative(); + // process pending commands + m_pConsole->StoreCommands(false); + while (1) { int64 FrameStartTime = time_get(); @@ -1915,7 +1918,7 @@ void CClient::RegisterCommands() m_pConsole->Register("quit", "", CFGFLAG_CLIENT, Con_Quit, this, "Quit Teeworlds"); m_pConsole->Register("exit", "", CFGFLAG_CLIENT, Con_Quit, this, "Quit Teeworlds"); - m_pConsole->Register("minimize", "", CFGFLAG_CLIENT, Con_Minimize, this, "Minimize Teeworlds"); + m_pConsole->Register("minimize", "", CFGFLAG_CLIENT|CFGFLAG_STORE, Con_Minimize, this, "Minimize Teeworlds"); m_pConsole->Register("connect", "s", CFGFLAG_CLIENT, Con_Connect, this, "Connect to the specified host/ip"); m_pConsole->Register("disconnect", "", CFGFLAG_CLIENT, Con_Disconnect, this, "Disconnect from the server"); m_pConsole->Register("ping", "", CFGFLAG_CLIENT, Con_Ping, this, "Ping the current server"); |