void terrain_create()
{
	

	
	Edit_type = 0;
//	newterrain = ent_createterrain(NULL,vector(5120,5120,0),256,256,40);
//	set(newterrain,POLYGON);
//	
	ent_setskin(newterrain,bDest,1);
//	vec_set(sky_color,vector(1,1,1));
	int dimen_1 = 257;
	int dimen_2 = 1;
	int counter = 1;
	
	int i = ent_status(newterrain, 0);
	var harray = 0;
	
	while(dimen_1 > 0)
	{
		map_array[dimen_1][dimen_2] = hmData[harray].vertex_high;
		counter +=1;
		dimen_2 +=1;
		harray += 1;
		if(dimen_2 > 257)
		{
			dimen_2 =1;
			dimen_1 -=1;
		}
	}
	
	var j = 0;
	
	dimen_1 = 1;
	dimen_2 = 1;
	
	for (; i>0; i--)
	{
		var vertexh = map_array[dimen_1][dimen_2];
		CONTACT* c = ent_getvertex(newterrain,NULL,i);
		c.v.y = vertexh;
		ent_setvertex(newterrain,c,i);
		dimen_1 +=1;
		if(dimen_1 > 257)
		{
			dimen_1  =1;
			dimen_2 +=1;
		}
	}
//	camera.x = -7500; 
//	camera.y =  5120; 
//	camera.z =  5710; 
//	camera.pan = 0; 
	camera.tilt = -24; 
	
	c_setminmax (newterrain);
	c_updatehull(newterrain,0);
	set(newterrain,POLYGON);
	
//	if(edit_ball)
//	{
		//ent_remove(edit_ball);
//	}
	
	
		
	if (ent_buffers(newterrain,0,0,&vbuffer,NULL,NULL) == 0)
	{
		error("vertex fehler");	
	}	
	
	
	
	
	
	//start_edit_ent();
	set(titel_leiste,SHOW);
//	set(pannelObjectEditStart,SHOW);
//	set(pannelObjectEditEnde,SHOW);
//	set(pannelObjectEditList,SHOW);
GUI_MAP_OBJECTS_START();

}