And damn 4502...it's a lot, makes me wonder if there is a bug in the way I calculate heightmaps...
Shouldn't be. I use a modified version of what you posted in CBash's thread, and it calculates it just fine. Verified it in the CS by dropping gold coins at the edges of a cell, and comparing the z-axis with what CBash calculated. It was dead-on every time.
float LANDRecord::CalcHeight(const unsigned int &row, const unsigned int &column) { if(!VHGT.IsLoaded()) return 0.0f; float fRetValue = http://forums.bethsoft.com/index.php?/topic/1082348-relz-land-magic/VHGT->offset * 8.0f; for(unsigned int curRow = 0; curRow <= row; ++curRow) fRetValue += (VHGT->VHGT[curRow][0] * 8.0f); for(unsigned int curColumn = 1; curColumn <= column; ++curColumn) fRetValue += (VHGT->VHGT[row][curColumn] * 8.0f); return fRetValue; }
My bet is that you're fixing LAND records in the various test worlds in Oblivion.esm. From what I remember when I poked around those places in-game, I remember seeing a ton of tears. They're not normally accessible, so it wouldn't hurt for Land Magic to explicitly skip them.