home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Level Design
/
GLDesign.bin
/
Software
/
UnrealEngine2Runtime
/
UE2Runtime-22262001_Demo.exe
/
Engine
/
Classes
/
MapList.uc
< prev
next >
Wrap
Text File
|
2003-06-23
|
900b
|
46 lines
//=============================================================================
// MapList.
//
// contains a list of maps to cycle through
//
//=============================================================================
class MapList extends Info
abstract;
var(Maps) config array<string> Maps;
var config int MapNum;
function string GetNextMap()
{
local string CurrentMap;
local int i;
CurrentMap = GetURLMap();
if ( CurrentMap != "" )
{
if ( Right(CurrentMap,4) ~= ".urt" )
CurrentMap = CurrentMap;
else
CurrentMap = CurrentMap$".urt";
for ( i=0; i<Maps.Length; i++ )
{
if ( CurrentMap ~= Maps[i] )
{
MapNum = i;
break;
}
}
}
// search vs. w/ or w/out .urt extension
MapNum++;
if ( MapNum > Maps.Length - 1 )
MapNum = 0;
if ( Maps[MapNum] == "" )
MapNum = 0;
SaveConfig();
return Maps[MapNum];
}