mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
Remove converge property
It's pointless since the same can be achieved by making speed negative
This commit is contained in:
parent
b4f166381f
commit
dcc256c15d
@ -534,18 +534,9 @@ 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);
|
||||||
|
p->base.velocity.X = diff.X * p->prop->speed;
|
||||||
if (p->prop->converge) {
|
p->base.velocity.Y = diff.Y * p->prop->speed;
|
||||||
p->base.velocity.X = (-diff.X) * p->prop->speed;
|
p->base.velocity.Z = diff.Z * 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.Y = diff.Y * p->prop->speed;
|
|
||||||
p->base.velocity.Z = diff.Z * p->prop->speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p->base.nextPos = p->base.lastPos;
|
p->base.nextPos = p->base.lastPos;
|
||||||
@ -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
|
||||||
|
|
||||||
|
@ -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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user