summaryrefslogtreecommitdiff
path: root/source/sv_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2009-02-05 12:56:45 +0000
committerAndrey Nazarov <skuller@skuller.net>2009-02-05 12:56:45 +0000
commitcb1f4461911154e547a15480ef98199832a2cbf7 (patch)
treecd3b36d543b775268c7a5a4a72ece7c14b2195f0 /source/sv_main.c
parent5dea48daf494adbf28c75cb74e478e5bc15fbff4 (diff)
Report download size/done percentage in the output of ‘status d’ command.
Fixed a small memory leak possible when client was requesting another download without stopping the previous one. Properly exit dedicated server running as Win32 service given a ‘quit’ command. No longer assume ‘portalopen’ array indices to be mapped directly into ‘areaportals’ array. No longer error out when CM_SetAreaPortalState is called on the areaportal inside MAX_MAP_AREAPORTALS range but not referenced anywhere on the map. Flush server logfile on Com_Error. Changed default value of ‘uf’ cvar to include UF_LOCALFOV (from 0 to 4). Added ‘cl_lag’ macro expanding to server to client packetloss percentage.
Diffstat (limited to 'source/sv_main.c')
-rw-r--r--source/sv_main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/source/sv_main.c b/source/sv_main.c
index ca72952..affd11c 100644
--- a/source/sv_main.c
+++ b/source/sv_main.c
@@ -121,14 +121,8 @@ void SV_CleanClient( client_t *client ) {
client->ac_bad_files = NULL;
#endif
- if( client->download ) {
- Z_Free( client->download );
- client->download = NULL;
- }
- if( client->downloadname ) {
- Z_Free( client->downloadname );
- client->downloadname = NULL;
- }
+ // close any existing donwload
+ SV_CloseDownload( client );
if( client->versionString ) {
Z_Free( client->versionString );
@@ -1850,8 +1844,7 @@ static void SV_FinalMessage( const char *message, int cmd ) {
================
SV_Shutdown
-Called when each game quits,
-before Sys_Quit or Sys_Error
+Called when each game quits, from Com_Quit or Com_Error
================
*/
void SV_Shutdown( const char *finalmsg, killtype_t type ) {