Skip to content
  • bank's avatar
    Fix for issue #210 for ParticleData sends out-of-range data via BitStream · 9b2caeed
    bank authored
    1. When addProtectedField used with custom setters, we need to return false, or it will set the value via regular routine after the method exists (change ParticleData::protectedSetTimes() to return false instead of true).
    
    2. The ParticleData::sizes[] needs a custom setter, so the value is clamped in a range of 0.f and MaxParticleSize.
    
    3. The spinRadnomMin and spinRandomMax ParticleData fields need a FRangeValidator, so it auto-clamped in a range of -1000 to 1000, as we are writing data trying to fit the values in 11 bits (as UInt upto 2048 max).
       * The description for those fields needs to be updated to use 1000 instead of 10000.
       * ParticleData::onAdd() should check for values to be in a correct range too.
    9b2caeed