Particle Emitter :

- fixed NPE when loading a ParticleEmitter from a j3o

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7942 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 14 years ago
parent 821dc08553
commit 2b802d5272
  1. 7
      engine/src/core/com/jme3/effect/ParticleEmitter.java

@ -1132,7 +1132,7 @@ public class ParticleEmitter extends Geometry {
meshType = ic.readEnum("meshType", ParticleMesh.Type.class, ParticleMesh.Type.Triangle);
int numParticles = ic.readInt("numParticles", 0);
this.setNumParticles(numParticles);
enabled = ic.readBoolean("enabled", true);
particlesPerSec = ic.readFloat("particlesPerSec", 0);
@ -1164,8 +1164,9 @@ public class ParticleEmitter extends Geometry {
default:
throw new IllegalStateException("Unrecognized particle type: " + meshType);
}
particleMesh.initParticleData(this, particles.length);
particleMesh.setImagesXY(imagesX, imagesY);
this.setNumParticles(numParticles);
// particleMesh.initParticleData(this, particles.length);
// particleMesh.setImagesXY(imagesX, imagesY);
particleInfluencer = (ParticleInfluencer) ic.readSavable("influencer", DEFAULT_INFLUENCER);
if (particleInfluencer == DEFAULT_INFLUENCER) {

Loading…
Cancel
Save