1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-19 03:39:08 +00:00

Fix plParticleSystem and plAgeLoadedMsg.

This commit is contained in:
Darryl Pogue
2011-10-27 21:20:26 -07:00
parent ee01c1f01d
commit dbced518cb
5 changed files with 12 additions and 6 deletions

View File

@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef plAgeLoadedMsg_INC #ifndef plAgeLoadedMsg_INC
#define plAgeLoadedMsg_INC #define plAgeLoadedMsg_INC
#include "pnUtils/pnUtils.h"
#include "pnMessage/plMessage.h" #include "pnMessage/plMessage.h"
// //

View File

@ -104,7 +104,8 @@ void plConvexVolume::Update(const hsMatrix44 &l2w)
{ {
// Since fN is an hsVector3, it will only apply the rotational aspect of the transform... // Since fN is an hsVector3, it will only apply the rotational aspect of the transform...
fWorldPlanes[i].fN = l2w * fLocalPlanes[i].fN; fWorldPlanes[i].fN = l2w * fLocalPlanes[i].fN;
planePt.Set(&(fLocalPlanes[i].fN * fLocalPlanes[i].fD)); hsVector3 tmp = fLocalPlanes[i].fN * fLocalPlanes[i].fD;
planePt.Set(&tmp);
fWorldPlanes[i].fD = -(l2w * planePt).InnerProduct(fWorldPlanes[i].fN); fWorldPlanes[i].fD = -(l2w * planePt).InnerProduct(fWorldPlanes[i].fN);
} }
} }

View File

@ -759,7 +759,8 @@ hsBool plParticleFlockEffect::ApplyEffect(const plEffectTargetInfo& target, Int3
goal = fDissenterTarget; goal = fDissenterTarget;
hsVector3 goalDir; hsVector3 goalDir;
goalDir.Set(&(goal - pos)); hsPoint3 tmp = goal - pos;
goalDir.Set(&tmp);
hsScalar distSq = goalDir.MagnitudeSquared(); hsScalar distSq = goalDir.MagnitudeSquared();
goalDir.Normalize(); goalDir.Normalize();

View File

@ -410,7 +410,11 @@ void plParticleEmitter::IUpdateParticles(hsScalar delta)
// This is the only orientation option (so far) that requires an update here // This is the only orientation option (so far) that requires an update here
if (fMiscFlags & (kOrientationVelocityBased | kOrientationVelocityStretch | kOrientationVelocityFlow)) if (fMiscFlags & (kOrientationVelocityBased | kOrientationVelocityStretch | kOrientationVelocityFlow))
fParticleCores[i].fOrientation.Set(&(*currVelocity * delta)); // mf - want the orientation to be a delposition {
// mf - want the orientation to be a delposition
hsVector3 tmp = *currVelocity * delta;
fParticleCores[i].fOrientation.Set(&tmp);
}
else if( fParticleExts[i].fRadsPerSec != 0 ) else if( fParticleExts[i].fRadsPerSec != 0 )
{ {
hsScalar sinX, cosX; hsScalar sinX, cosX;

View File

@ -216,7 +216,8 @@ hsBool plSimpleParticleGenerator::AddAutoParticles(plParticleEmitter *emitter, f
if( fPartRadsPerSecRange > 0 ) if( fPartRadsPerSecRange > 0 )
radsPerSec = fPartRadsPerSecRange * sRandom.RandMinusOneToOne(); radsPerSec = fPartRadsPerSecRange * sRandom.RandMinusOneToOne();
emitter->AddParticle(currStart, initDirection * initVelocity, tile, fXSize, fYSize, currSizeVar, hsVector3 tmp = initDirection * initVelocity;
emitter->AddParticle(currStart, tmp, tile, fXSize, fYSize, currSizeVar,
invMass, initLife, orientation, miscFlags, radsPerSec); invMass, initLife, orientation, miscFlags, radsPerSec);
} }
@ -451,4 +452,4 @@ void plOneTimeParticleGenerator::Write(hsStream* s, hsResMgr *mgr)
fPosition[i].Write(s); fPosition[i].Write(s);
fDirection[i].Write(s); fDirection[i].Write(s);
} }
} }