Merge pull request #13494 from dback2/zeroOutSpreads

Particle spreads backwards compatibility
This commit is contained in:
David Back 2018-07-02 10:43:34 -07:00 committed by GitHub
commit 54664855ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2521,6 +2521,13 @@ bool EntityTree::readFromMap(QVariantMap& map) {
}
}
// Zero out the spread values that were fixed in version ParticleEntityFix so they behave the same as before
if (contentVersion < (int)EntityVersion::ParticleEntityFix) {
properties.setRadiusSpread(0.0f);
properties.setAlphaSpread(0.0f);
properties.setColorSpread({0, 0, 0});
}
EntityItemPointer entity = addEntity(entityItemID, properties);
if (!entity) {
qCDebug(entities) << "adding Entity failed:" << entityItemID << properties.getType();