about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-30 19:38:08 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-30 19:38:08 +0000
commit75273485c47247d13e5d533b19b65402db6d660c (patch)
tree56eae7f0a7ffcec425c96aa8446fc111513f89e9 /src/engine
parentcddf3c0f60d2d74c76a7845606ad47a9fb9f53d3 (diff)
downloadzcatch-75273485c47247d13e5d533b19b65402db6d660c.tar.gz
zcatch-75273485c47247d13e5d533b19b65402db6d660c.zip
fixed closing of map download when disconnecting
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/ec_client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c
index 142c8b70..4e139b75 100644
--- a/src/engine/client/ec_client.c
+++ b/src/engine/client/ec_client.c
@@ -499,6 +499,16 @@ void client_disconnect_with_reason(const char *reason)
 	netclient_disconnect(net, reason);
 	client_set_state(CLIENTSTATE_OFFLINE);
 	map_unload();
+	
+	/* disable all downloads */
+	mapdownload_chunk = 0;
+	if(mapdownload_file)
+		io_close(mapdownload_file);
+	mapdownload_file = 0;
+	mapdownload_crc = 0;
+	mapdownload_totalsize = -1;
+	mapdownload_amount = 0;
+	
 }
 
 void client_disconnect()