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:
@ -42,7 +42,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#ifndef plAgeLoadedMsg_INC
|
||||
#define plAgeLoadedMsg_INC
|
||||
|
||||
#include "pnUtils/pnUtils.h"
|
||||
#include "pnMessage/plMessage.h"
|
||||
|
||||
//
|
||||
|
@ -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...
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -759,7 +759,8 @@ hsBool plParticleFlockEffect::ApplyEffect(const plEffectTargetInfo& target, Int3
|
||||
goal = fDissenterTarget;
|
||||
|
||||
hsVector3 goalDir;
|
||||
goalDir.Set(&(goal - pos));
|
||||
hsPoint3 tmp = goal - pos;
|
||||
goalDir.Set(&tmp);
|
||||
hsScalar distSq = goalDir.MagnitudeSquared();
|
||||
|
||||
goalDir.Normalize();
|
||||
|
@ -410,7 +410,11 @@ void plParticleEmitter::IUpdateParticles(hsScalar delta)
|
||||
|
||||
// This is the only orientation option (so far) that requires an update here
|
||||
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 )
|
||||
{
|
||||
hsScalar sinX, cosX;
|
||||
|
@ -216,7 +216,8 @@ hsBool plSimpleParticleGenerator::AddAutoParticles(plParticleEmitter *emitter, f
|
||||
if( fPartRadsPerSecRange > 0 )
|
||||
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);
|
||||
}
|
||||
|
||||
@ -451,4 +452,4 @@ void plOneTimeParticleGenerator::Write(hsStream* s, hsResMgr *mgr)
|
||||
fPosition[i].Write(s);
|
||||
fDirection[i].Write(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user