// Map order
MapPlayOrder<- [
"mp_coop_chamber_1",
"mp_coop_lobby_2"

]
 
function TransitionFromMap()
{	
	local nextmap = -2
 
	// Loop through maps
	foreach( index, map in MapPlayOrder )
	{
		if( GetMapName() == MapPlayOrder[index] )
		{
			// This is the map we're on
			nextmap = -1
		}
		else 
		{
			if (nextmap == -1)
			{
				// This is the first map past that one
				nextmap = index
			}
		}
	}
 
	printl( "nextmap = " + nextmap )
 
	if (nextmap > 0)
	{
		// We found a map; go to it
		EntFire( "@command", "command", "changelevel " + MapPlayOrder[nextmap], 1.0 )
	}
	else
	{
		// No map found; we're done
		EntFire( "@command", "command", "disconnect", 2.0 )
	}
}