Skip to content

Commit

Permalink
JPA minor work
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Jul 16, 2024
1 parent 49d7b9e commit 4375c45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/JSystem/JParticle/JPAEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void JPABaseEmitter::calcChild() {
JPABaseParticle * ptcl = (JPABaseParticle *) link->getObjectPtr();
ptcl->incFrame();
if (!ptcl->checkStatus(0x80)) {
if ((s32)ptcl->mCurFrame != 0)
if (ptcl->getAge() != 0)
ptcl->calcVelocity();
ptcl->calcCB(this);
if (!ptcl->checkStatus(0x02)) {
Expand Down
6 changes: 3 additions & 3 deletions src/JSystem/JParticle/JPAParticle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void JPABaseParticle::initParticle() {
else
velAxis.zero();

if (emtr->mInitialVelDir != 0.0f) {
if (emtr->mInitialVelDir) {
Mtx mtx;
JPAGetYZRotateMtx(emtr->mSpread * emtr->getRandomRF() * 32768.0f, emtr->getRandomSS(), mtx);
MTXConcat(emtrInfo.mEmitterDirMtx, mtx, mtx);
Expand All @@ -48,7 +48,7 @@ void JPABaseParticle::initParticle() {
velDir.zero();
}

if (emtr->mInitialVelRndm != 0.0f) {
if (emtr->mInitialVelRndm) {
velRndm.set(
emtr->mInitialVelRndm * emtr->getRandomSF(),
emtr->mInitialVelRndm * emtr->getRandomSF(),
Expand Down Expand Up @@ -165,7 +165,7 @@ void JPABaseParticle::incFrame() {

if (mCurFrame >= mLifeTime) {
mCurNormTime = 1.0f;
setStatus(0x02); // setDeleteParticleFlag
setStatus(0x02); // setDeleteParticleFlag?
} else {
mCurNormTime = mCurFrame / mLifeTime;
}
Expand Down

0 comments on commit 4375c45

Please sign in to comment.