Yeah, I don't mind Just didn't want this theme to be flooded, but since info was useful, then ofc I don't.
Now concerning the hole:
I didn't get such a problem. Hope I can help you. Here is some code for hole handling:
PHP Code:
//just some general code, deciding whether i should add a square of 4 triangles or there is a hole.
//i numerated all squares and i pass that number to the hole check function as well as the hole bitmap
uint holes = Chunks[c].header.holeBitmap;
for (int i = 0; i < 8; ++i)
for (int j = 0; j < 8; ++j)
{
if (ADTReader.HolesCheck(i * 8 + j, holes))
{
//..add triangles
}
}
//now the hole checking function:
public static bool HolesCheck(int p, uint holes) //true if there is no hole, false otherwise
{
uint checkBits=0x1;
for (int i = 0; i < 16; i++)
{
if ((holes & checkBits) != 0)
{
int holeCol = i % 4;
int holeRow = (int)(i / 4);
int temp=16*holeRow+holeCol*2;
if ((p == temp) | (p == temp + 1) | (p == temp + 8) | (p == temp + 9))
{
return false;
}
}
checkBits=checkBits << 1;
}
return true;
}
// there are 8x8 squares each of 4 triangle that form a chunk. Holes are some greater scale with possible only 4x4 positions. So i get the number of chunk square total of 0-63, then I iterate through all holes and see if there is one that "consumes" the square . Since there is 4 squares per hole (2x2), I match the hole number with the square number by holeRow*16+holeCol*2 (since it's 2:1). Then the square is consumed by the hole if their number is equal or (+1). Or if square is one line down (+8) or it's down and adjucent (+9 total). Now i see that's easier to first get hole number from the square number, and then do some very simple actions, but who knew :D
P.S. I know that's rather shitty function, I had much mess in my head while writing this, because of blizzard million coord systems and no consistency or style at all. So probably it's much easier to read something about holes here: wowdev adt/v18, but since you have some holes in right places i guess there is a mistake somewhere in your code probably, just check it
When writing this code i had a paper with some ( 145 ) nodes painted and that was rather easy to understand those magic numbers.
P.P.S. And btw those MCRD and MCRW chunks are needed not to overlap WMOs between adjacent adts (as some memory comes to me). All WMOs that are at the border of the map ADTs are referenced twice in both ADTs, but only once presented in MCRW. Same with some trees at the borders and so on.