mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 22:37:04 +00:00
[11305] more safe code in vmaps and Field class
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
1fea8a321f
commit
43db4eaaa2
5 changed files with 10 additions and 13 deletions
|
|
@ -127,7 +127,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32> &tempTree, buildDat
|
|||
if (right == rightOrig)
|
||||
{
|
||||
// all left
|
||||
if (prevAxis == axis && prevSplit == split) {
|
||||
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);
|
||||
|
|
@ -146,7 +146,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32> &tempTree, buildDat
|
|||
else if (left > right)
|
||||
{
|
||||
// all right
|
||||
if (prevAxis == axis && prevSplit == split) {
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue