private void performFinalLandJoin(ILandObject master, ILandObject slave) { bool[,] landBitmapSlave = slave.GetLandBitmap(); lock (m_landList) { for (int x = 0; x < 64; x++) { for (int y = 0; y < 64; y++) { if (landBitmapSlave[x, y]) { m_landIDList[x, y] = master.LandData.LocalID; } } } } removeLandObject(slave.LandData.LocalID); UpdateLandObject(master.LandData.LocalID, master.LandData); }
private void performFinalLandJoin(ILandObject master, ILandObject slave) { bool[,] landBitmapSlave = slave.GetLandBitmap(); m_landListRwLock.AcquireWriterLock(-1); try { for (int x = 0; x < landBitmapSlave.GetLength(0); x++) { for (int y = 0; y < landBitmapSlave.GetLength(1); y++) { if (landBitmapSlave[x, y]) { m_landIDList[x, y] = master.LandData.LocalID; } } } } finally { m_landListRwLock.ReleaseWriterLock(); } removeLandObject(slave.LandData.LocalID); UpdateLandObject(master.LandData.LocalID, master.LandData); }