var collision_1 = 0;
var collision_2 = 0;
ENTITY* collision_1_ent[65536];
ENTITY* collision_2_ent[65536];

void create_collisions_map_1()
{
	var coord_x = 0;
	var coord_y = 0;
	var counter = 0;
	
	
	if(collision_1 == 0)
	{
		while(counter < 65536)
		{
			if(sma_data2[counter].colision_water_type == 1 )
			{
				collision_1_ent[counter] = ent_create("ped.tga",vector(coord_x,coord_y,2000),NULL);
				collision_1_ent[counter].pan = 0.001;
				collision_1_ent[counter].tilt = -90;
				collision_1_ent[counter].roll =0.001;
			}
			coord_y +=40;
			if(coord_y >= 10240)
			{
				coord_y = 0;
				coord_x +=40;
			}
			counter += 1;
		}
		collision_1 = 1;
	}
	else
	{
		while(counter <65536)
		{
			ptr_remove(collision_1_ent[counter]);
			counter += 1;
		}
		collision_1 = 0;
	}
}

void create_collisions_map_2()
{
	var coord_x = 0;
	var coord_y = 0;
	var counter = 0;
	
	if(collision_2 == 0)
	{
		while(counter < 65536)
		{
			if(sma_data2[counter].colision_hm_type > 0 )
			{
				collision_2_ent[counter] = ent_create("ped.tga",vector(coord_x,coord_y,2000),NULL);
				collision_2_ent[counter].pan = 0.001;
				collision_2_ent[counter].tilt = -90;
				collision_2_ent[counter].roll =0.001;
			}
			coord_y +=40;
			if(coord_y >= 10240)
			{
				coord_y = 0;
				coord_x +=40;
			}
			counter += 1;
		}
		collision_2 = 1;
	}
	else
	{
		while(counter <65536)
		{
			ptr_remove(collision_2_ent[counter]);
			counter += 1;
		}
		collision_2 = 0;
	}
}