summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-01-07 21:04:01 -0800
committerVito Caputo <vcaputo@gnugeneration.com>2017-01-07 21:04:01 -0800
commitbc0ea63460100f61e6c6b73abe20c1f4ffae5db4 (patch)
tree631016c35c4b691bc153b5320ca02c2b06c5a09a
parentdacd3f84c7d8057e8f7a22f4e08cd37f51064cb7 (diff)
sparkler: stop scaling gravity vector every particle
vestigial deficiency from variable gravity experiment also reduced gravity, the results seem more aesthetically pleasing.
-rw-r--r--modules/sparkler/particles.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/sparkler/particles.c b/modules/sparkler/particles.c
index 69f55dd..0eb260e 100644
--- a/modules/sparkler/particles.c
+++ b/modules/sparkler/particles.c
@@ -300,11 +300,9 @@ static inline void _particles_age(particles_t *particles, list_head_t *list)
#if 1
if (p->props.mass > 0.0f) {
/* gravity, TODO: mass isn't applied. */
- static v3f_t gravity = v3f_init(0.0f, -1.0f, 0.0f);
- v3f_t g;
+ static v3f_t gravity = v3f_init(0.0f, -0.05f, 0.0f);
- g = v3f_mult_scalar(&gravity, 0.08f);
- p->props.direction = v3f_add(&p->props.direction, &g);
+ p->props.direction = v3f_add(&p->props.direction, &gravity);
p->props.direction = v3f_normalize(&p->props.direction);
}
#endif
© All Rights Reserved