Remove converge property

It's pointless since the same can be achieved by making speed negative
This commit is contained in:
Goodlyay 2020-02-21 19:49:37 -08:00
parent b4f166381f
commit dcc256c15d
2 changed files with 3 additions and 14 deletions

View File

@ -534,20 +534,11 @@ void Particles_CustomEffect(float x, float y, float z, int propertyID, float ori
Vec3 diff; Vec3 diff;
Vec3_Sub(&diff, &p->base.lastPos, &origin); Vec3_Sub(&diff, &p->base.lastPos, &origin);
Vec3_Normalize(&diff, &diff); Vec3_Normalize(&diff, &diff);
if (p->prop->converge) {
p->base.velocity.X = (-diff.X) * p->prop->speed;
p->base.velocity.Y = (-diff.Y) * p->prop->speed;
p->base.velocity.Z = (-diff.Z) * p->prop->speed;
}
else {
p->base.velocity.X = diff.X * p->prop->speed; p->base.velocity.X = diff.X * p->prop->speed;
p->base.velocity.Y = diff.Y * p->prop->speed; p->base.velocity.Y = diff.Y * p->prop->speed;
p->base.velocity.Z = diff.Z * p->prop->speed; p->base.velocity.Z = diff.Z * p->prop->speed;
} }
}
p->base.nextPos = p->base.lastPos; p->base.nextPos = p->base.lastPos;
p->base.lifetime = p->prop->baseLifetime + ( (p->prop->baseLifetime * p->prop->lifetimeVariation) * ((Random_Float(&rnd) - 0.5f) * 2)); p->base.lifetime = p->prop->baseLifetime + ( (p->prop->baseLifetime * p->prop->lifetimeVariation) * ((Random_Float(&rnd) - 0.5f) * 2));
p->totalLifespan = p->base.lifetime; p->totalLifespan = p->base.lifetime;
@ -611,7 +602,6 @@ static void Particles_Init(void) {
prop->baseLifetime = 0.7f; prop->baseLifetime = 0.7f;
prop->lifetimeVariation = 0.5f; prop->lifetimeVariation = 0.5f;
prop->fullBright = true; prop->fullBright = true;
prop->converge = true;
prop->expireUponTouchingGround = true; prop->expireUponTouchingGround = true;
//END TEMP CODE //END TEMP CODE

View File

@ -30,7 +30,6 @@ struct CustomParticleProperty {
float lifetimeVariation; float lifetimeVariation;
cc_bool expireUponTouchingGround; cc_bool expireUponTouchingGround;
cc_bool fullBright; cc_bool fullBright;
cc_bool converge; ////true means the particles move toward the origin. False means they move away from the origin
}; };
extern struct CustomParticleProperty customParticle_properties[256]; extern struct CustomParticleProperty customParticle_properties[256];