Fix typo in VMap BIH generation

Due to this typo some objects could be left out during BIH generation and thus never checked for intersection.
This breaks height and LoS calculations in some areas.

This occurrence of this bug can be seen in "Md_Mushroomcave.wmo". It can be found in several locations,
for example (-6140, -2960, 400), map 0.
In some parts of the cave mobs will either fall through the ground or fly up into the sky when chasing the player.
LoS is not obstructed there as well.

P.S. This typo presents in all MaNGOS cores.
This commit is contained in:
mityada 2016-11-06 19:50:14 +00:00 committed by Antz
parent 0c1bb928e5
commit de951b99da

View file

@ -157,8 +157,8 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat
if (prevAxis == axis && G3D::fuzzyEq(prevSplit, split))
{
// we are stuck here - create a leaf
stats.updateLeaf(depth, right - left + 1);
createNode(tempTree, nodeIndex, left, right);
stats.updateLeaf(depth, rightOrig - left + 1);
createNode(tempTree, nodeIndex, left, rightOrig);
return;
}
right = rightOrig;