This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 9954 for ps


Ignore:
Timestamp:
08/02/11 23:07:58 (13 years ago)
Author:
philip
Message:

Fix hang with Boost 1.47

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/graphics/ParticleEmitterType.cpp

    r9509 r9954  
    446446            if (id != -1)
    447447            {
    448                 m_Variables[id] = IParticleVarPtr(new CParticleVarUniform(
    449                     Child.GetAttributes().GetNamedItem(at_min).ToFloat(),
    450                     Child.GetAttributes().GetNamedItem(at_max).ToFloat()
    451                 ));
     448                float min = Child.GetAttributes().GetNamedItem(at_min).ToFloat();
     449                float max = Child.GetAttributes().GetNamedItem(at_max).ToFloat();
     450                // To avoid hangs in the RNG, only use it if [min, max) is non-empty
     451                if (min < max)
     452                    m_Variables[id] = IParticleVarPtr(new CParticleVarUniform(min, max));
     453                else
     454                    m_Variables[id] = IParticleVarPtr(new CParticleVarConstant(min));
    452455            }
    453456        }
Note: See TracChangeset for help on using the changeset viewer.