Fix hang with Boost 1.47

This was SVN commit r9954.
This commit is contained in:
Ykkrosh 2011-08-02 21:07:58 +00:00
parent acbb59d982
commit 94e9a8b459

View File

@ -445,10 +445,13 @@ bool CParticleEmitterType::LoadXML(const VfsPath& path)
int id = GetVariableID(Child.GetAttributes().GetNamedItem(at_name)); int id = GetVariableID(Child.GetAttributes().GetNamedItem(at_name));
if (id != -1) if (id != -1)
{ {
m_Variables[id] = IParticleVarPtr(new CParticleVarUniform( float min = Child.GetAttributes().GetNamedItem(at_min).ToFloat();
Child.GetAttributes().GetNamedItem(at_min).ToFloat(), float max = Child.GetAttributes().GetNamedItem(at_max).ToFloat();
Child.GetAttributes().GetNamedItem(at_max).ToFloat() // To avoid hangs in the RNG, only use it if [min, max) is non-empty
)); if (min < max)
m_Variables[id] = IParticleVarPtr(new CParticleVarUniform(min, max));
else
m_Variables[id] = IParticleVarPtr(new CParticleVarConstant(min));
} }
} }
else if (Child.GetNodeName() == el_copy) else if (Child.GetNodeName() == el_copy)