int multi=-1;
P_ITEM multi = NULL;
int findmulti(Coord_cl pos) //Sortta like getboat() only more general... use this for other multi stuff!{	int lastdist=30;	int multi=-1;	int ret;	int	StartGrid=mapRegions->StartGrid(pos.x,pos.y);				unsigned int increment=0;	for (unsigned int checkgrid=StartGrid+(increment*mapRegions->GetColSize());increment<3;increment++, checkgrid=StartGrid+(increment*mapRegions->GetColSize()))	{		for (int a=0;a<3;a++)		{			vector<SERIAL> vecEntries = mapRegions->GetCellEntries(checkgrid+a);			for ( unsigned int k = 0; k < vecEntries.size(); k++)			{				P_ITEM mapitem = FindItemBySerial(vecEntries[k]);				if (mapitem != NULL)				{					if (mapitem->id1>=0x40)					{						/*dx=abs(pos.x - items[mapitem].pos.x);						dy=abs(pos.y - items[mapitem].pos.y);						ret=(int)(hypot(dx, dy));						*/						ret = pos.distance(mapitem->pos);						if (ret<=lastdist)						{							lastdist=ret;							if (inmulti(pos, mapitem))								multi = DEREF_P_ITEM(mapitem);						}					}				}			}		}//For a	}//For checkgrid	return multi;}