about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-08-15 15:41:04 +0200
committeroy <Tom_Adams@web.de>2010-08-15 15:41:04 +0200
commit94b28c8c973ea4c7c405c966038f3c2a6934ed13 (patch)
tree5cdf9407105d4eb0bfdb07754165d152eb51c569 /src/engine/client
parent0e36b772d431eef1dfb8ae2abee527aaf40558fd (diff)
downloadzcatch-94b28c8c973ea4c7c405c966038f3c2a6934ed13.tar.gz
zcatch-94b28c8c973ea4c7c405c966038f3c2a6934ed13.zip
fixed quit/exit command problem on startup
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/client.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index d2872408..ce27e46f 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -1269,7 +1269,7 @@ void CClient::PumpNetwork()
 	if(State() != IClient::STATE_DEMOPLAYBACK)
 	{
 		// check for errors
-		if(State() != IClient::STATE_OFFLINE && m_NetClient.State() == NETSTATE_OFFLINE)
+		if(State() != IClient::STATE_OFFLINE && State() != IClient::STATE_QUITING && m_NetClient.State() == NETSTATE_OFFLINE)
 		{
 			SetState(IClient::STATE_OFFLINE);
 			Disconnect();
@@ -1922,8 +1922,8 @@ void CClient::RegisterCommands()
 	m_pConsole->Register("stoprecord", "", CFGFLAG_SERVER, 0, 0, "Stop recording");
 	m_pConsole->Register("reload", "", CFGFLAG_SERVER, 0, 0, "Reload the map");
 
-	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("quit", "", CFGFLAG_CLIENT|CFGFLAG_STORE, Con_Quit, this, "Quit Teeworlds");
+	m_pConsole->Register("exit", "", CFGFLAG_CLIENT|CFGFLAG_STORE, Con_Quit, this, "Quit 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");