summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pig.c b/src/pig.c
index 97d09fe..f206271 100644
--- a/src/pig.c
+++ b/src/pig.c
@@ -76,11 +76,11 @@ static void pig_uniforms_func(shader_t *shader, void *uniforms_ctxt, void *rende
/* this one resets every second and gets constrained to 0.f-1.f */
t1 = play_ticks(play, PLAY_TICKS_TIMER1);
- if (t1 >= 1000) {
+ if (t1 > 1000) {
randomize_color(&pig->color);
pig->seed = randf();
- play_ticks_reset(play, PLAY_TICKS_TIMER1);
+ t1 = play_ticks_reset(play, PLAY_TICKS_TIMER1);
}
glUniform1f(uniforms[0], alpha);
© 2021 All Rights Reserved