bugfix, wrongly assigned value to a local variable (copy/paste bug).
Thanks binofet, see http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=366
This commit is contained in:
@@ -115,11 +115,11 @@ btScalar btHeightfieldTerrainShape::getHeightFieldValue(int x,int y) const
|
|||||||
btScalar val = 0.f;
|
btScalar val = 0.f;
|
||||||
if (m_useFloatData)
|
if (m_useFloatData)
|
||||||
{
|
{
|
||||||
btScalar val = m_heightfieldDataFloat[(y*m_width)+x];
|
val = m_heightfieldDataFloat[(y*m_width)+x];
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y*m_width)+x];
|
unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y*m_width)+x];
|
||||||
btScalar val = heightFieldValue* (m_maxHeight/btScalar(65535));
|
val = heightFieldValue* (m_maxHeight/btScalar(65535));
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user