This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 6a72eeab191138954ca7409df654fcb1ef6f13c7
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Sun May 18 14:17:35 2014 +0000

    All: Fix download loop when loading 'media-only' mods from pure servers
---
 MP/code/server/sv_init.c | 37 ++++++++++++++++++++-----------------
 SP/code/server/sv_init.c | 20 ++++++++++----------
 2 files changed, 30 insertions(+), 27 deletions(-)

diff --git a/MP/code/server/sv_init.c b/MP/code/server/sv_init.c
index bd9f0c2..b224151 100644
--- a/MP/code/server/sv_init.c
+++ b/MP/code/server/sv_init.c
@@ -512,7 +512,7 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
        int i;
        int checksum;
        qboolean isBot;
-       char systemInfo[MAX_INFO_STRING];
+       char systemInfo[16384];
        const char  *p;
 
        // shut down the existing game if it is running
@@ -534,18 +534,6 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
        // clear collision map data             // (SA) NOTE: TODO: used in 
missionpack
        CM_ClearMap();
 
-       // wipe the entire per-level structure
-       SV_ClearServer();
-
-       // MrE: main zone should be pretty much emtpy at this point
-       // except for file system data and cached renderer data
-       Z_LogHeap();
-
-       // allocate empty config strings
-       for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) {
-               sv.configstrings[i] = CopyString( "" );
-       }
-
        // init client structures and svs.numSnapshotEntities
        if ( !Cvar_VariableValue( "sv_running" ) ) {
                SV_Startup();
@@ -579,6 +567,18 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
                }
        }
 
+       // wipe the entire per-level structure
+       SV_ClearServer();
+
+       // MrE: main zone should be pretty much emtpy at this point
+       // except for file system data and cached renderer data
+       Z_LogHeap();
+
+       // allocate empty config strings
+       for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) {
+               sv.configstrings[i] = CopyString( "" );
+       }
+
        // Ridah
        // DHM - Nerve :: We want to use the completion bar in multiplayer as 
well
        if ( sv_gametype->integer == GT_SINGLE_PLAYER || sv_gametype->integer 
>= GT_WOLF ) {
@@ -712,6 +712,13 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
                }
                p = FS_LoadedPakNames();
                Cvar_Set( "sv_pakNames", p );
+
+               // we want the server to reference the mp_bin pk3 that the 
client is expected to load from
+               // if a dedicated pure server we need to touch the cgame 
because it could be in a
+               // seperate pk3 file and the client will need to load the 
latest cgame
+               if ( com_dedicated->integer ) {
+                       SV_TouchCGameDLL();
+               }
        } else {
                Cvar_Set( "sv_paks", "" );
                Cvar_Set( "sv_pakNames", "" );
@@ -719,10 +726,6 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
        // the server sends these to the clients so they can figure
        // out which pk3s should be auto-downloaded
        // NOTE: we consider the referencedPaks as 'required for operation'
-
-       // we want the server to reference the mp_bin pk3 that the client is 
expected to load from
-       SV_TouchCGameDLL();
-
        p = FS_ReferencedPakChecksums();
        Cvar_Set( "sv_referencedPaks", p );
        p = FS_ReferencedPakNames();
diff --git a/SP/code/server/sv_init.c b/SP/code/server/sv_init.c
index 59ecfd3..4d7ddf9 100644
--- a/SP/code/server/sv_init.c
+++ b/SP/code/server/sv_init.c
@@ -691,7 +691,7 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
        int i;
        int checksum;
        qboolean isBot;
-       char systemInfo[MAX_INFO_STRING];
+       char systemInfo[16384];
        const char  *p;
 
        // Ridah, enforce maxclients in single player, so there is enough room 
for AI characters
@@ -746,14 +746,6 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
 //     // clear collision map data             // (SA) NOTE: TODO: used in 
missionpack
 //     CM_ClearMap();
 
-       // wipe the entire per-level structure
-       SV_ClearServer();
-
-       // allocate empty config strings
-       for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) {
-               sv.configstrings[i] = CopyString( "" );
-       }
-
        // init client structures and svs.numSnapshotEntities
        if ( !Cvar_VariableValue( "sv_running" ) ) {
                SV_Startup();
@@ -787,6 +779,14 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
                }
        }
 
+       // wipe the entire per-level structure
+       SV_ClearServer();
+
+       // allocate empty config strings
+       for ( i = 0 ; i < MAX_CONFIGSTRINGS ; i++ ) {
+               sv.configstrings[i] = CopyString( "" );
+       }
+
        // Ridah
        if ( sv_gametype->integer == GT_SINGLE_PLAYER ) {
                SV_SetExpectedHunkUsage( va( "maps/%s.bsp", server ) );
@@ -799,7 +799,7 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
        Cvar_Set( "cl_paused", "0" );
 
        // get a new checksum feed and restart the file system
-       sv.checksumFeed = ( ( (int) rand() << 16 ) ^ rand() ) ^ 
Sys_Milliseconds();
+       sv.checksumFeed = ( ( (int) rand() << 16 ) ^ rand() ) ^ 
Com_Milliseconds();
        FS_Restart( sv.checksumFeed );
 
        CM_LoadMap( va( "maps/%s.bsp", server ), qfalse, &checksum );

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to