fixed a bug where mapcyclefile might not be read properly
authorDavid Anderson <dvander@alliedmods.net>
Sun Dec 02 16:43:34 2007 +0000 (2007-12-02)
changeset 1746e8187a3f2f08
parent 1745 6f11b5b0241f
child 1747 9cb38fd5579b
fixed a bug where mapcyclefile might not be read properly
core/smn_maplists.cpp
     1.1 --- a/core/smn_maplists.cpp	Sun Dec 02 16:43:19 2007 +0000
     1.2 +++ b/core/smn_maplists.cpp	Sun Dec 02 16:43:34 2007 +0000
     1.3 @@ -77,7 +77,6 @@
     1.4  	}
     1.5  	void OnSourceModAllInitialized()
     1.6  	{
     1.7 -		m_pMapCycleFile = icvar->FindVar("mapcyclefile");
     1.8  		g_SourceMod.BuildPath(Path_SM, m_ConfigFile, sizeof(m_ConfigFile), "configs/maplists.cfg");
     1.9  	}
    1.10  	void OnSourceModShutdown()
    1.11 @@ -157,6 +156,8 @@
    1.12  			return;
    1.13  		}
    1.14  
    1.15 +		m_pMapCycleFile = icvar->FindVar("mapcyclefile");
    1.16 +
    1.17  		/* Dump everything we know about. */
    1.18  		List<maplist_info_t *> compat;
    1.19  		DumpCache(&compat);
    1.20 @@ -343,7 +344,7 @@
    1.21  					success = GetMapList(&pNewArray, name, &change_serial);
    1.22  				}
    1.23  				/* If either of the last two conditions failed, try again if we can. */
    1.24 -				if (!success)
    1.25 +				if (!success && strcmp(name, "mapcyclefile") != 0)
    1.26  				{
    1.27  					success = GetMapList(&pNewArray, "mapcyclefile", &change_serial);
    1.28  				}