At samuncle's request, don't randomize the last LOD level

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8268 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2011-04-09 19:18:41 +00:00
parent 41507dc2e8
commit 454139bb7d

View File

@@ -80,7 +80,12 @@ void LODNode::add(int level, scene::ISceneNode* node, bool reparent)
{
// samuncle suggested to put a slight randomisation in LOD
// I'm not convinced (Auria) but he's the artist pro, so I listen ;P
level += (int)(((rand()%1000)-500)/500.0f*(level*0.1f));
// The last level should not be randomized because after that the object disappears,
// and the location is disapparition needs to be deterministic
if (m_detail.size() > 0)
{
m_detail[m_detail.size() - 1] += (int)(((rand()%1000)-500)/500.0f*(m_detail[m_detail.size() - 1]*0.2f));
}
assert(node != NULL);