aboutsummaryrefslogtreecommitdiff
path: root/visualization/extrasmeltutils.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-18 23:58:40 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-18 23:58:40 +0800
commit8ef9703ee2a4b22395935030606fcf69e3acad86 (patch)
treeafebccb5bc50afeed0291569cab993fddafd4d34 /visualization/extrasmeltutils.cpp
parent473470054a4f67c67fb3f40a0438e87aff68703c (diff)
downloadQMidiPlayer-8ef9703ee2a4b22395935030606fcf69e3acad86.tar.xz
Finally finish the particle system integration.
Add std::wstring version APIs to avoid wrong encoding. Update documentation.
Diffstat (limited to 'visualization/extrasmeltutils.cpp')
-rw-r--r--visualization/extrasmeltutils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/visualization/extrasmeltutils.cpp b/visualization/extrasmeltutils.cpp
index dc12c8c..18fafa9 100644
--- a/visualization/extrasmeltutils.cpp
+++ b/visualization/extrasmeltutils.cpp
@@ -92,7 +92,7 @@ void smParticle::update()
q.v[3].x=v3.x+pos.x;q.v[3].y=v3.y+pos.y;q.v[3].z=v3.z+pos.z;
}
smParticleSystem::smParticleSystem()
-{sm=smGetInterface(SMELT_APILEVEL);particles.clear();posGenerator=NULL;}
+{sm=smGetInterface(SMELT_APILEVEL);particles.clear();posGenerator=NULL;active=false;}
smParticleSystem::~smParticleSystem()
{for(unsigned i=0;i<particles.size();++i)delete particles[i];particles.clear();}
void smParticleSystem::setParticleSystemInfo(smParticleSystemInfo _psinfo)
@@ -109,7 +109,7 @@ void smParticleSystem::stopPS()
void smParticleSystem::updatePS()
{
cemdelay+=sm->smGetDelta();
- if(cemdelay>nemdelay&&(int)particles.size()<psinfo.maxcount)
+ if(active&&cemdelay>nemdelay&&(int)particles.size()<psinfo.maxcount)
{
int ec=re.nextInt(psinfo.emissioncount-psinfo.ecvar,psinfo.emissioncount+psinfo.ecvar);
for(int i=0;i<ec;++i)