--Bug fixes

-Changes in the xaos grid were not always being processed due to rounding.
This commit is contained in:
mfeemster
2016-01-16 11:51:29 -08:00
parent 19385c28b9
commit 0b05f1a394
3 changed files with 28 additions and 24 deletions

View File

@ -159,16 +159,13 @@ public:
}
}
#ifdef _DEBUG
//Ensure every element of the distribution was populated.
if (j < CHOOSE_XFORM_GRAIN)
throw "Not all distribution elements set, undefined behavior.";
#endif
//If probability was zero, then nothing was filled in, so make all zero.
//If it was non zero but for some reason didn't fill all elements, then just make the remaining
//elements have the index of the last xform.
byte val = j ? byte(i - 1) : 0;
for (; j < CHOOSE_XFORM_GRAIN; j++)//Make absolutely sure they are set to a valid value.
m_XformDistributions[(distrib * CHOOSE_XFORM_GRAIN) + j] = byte(i - 1);
m_XformDistributions[(distrib * CHOOSE_XFORM_GRAIN) + j] = val;
//Flam3 did this, which gives the same result.
//T t = xforms[0].m_Weight;