summaryrefslogtreecommitdiff
path: root/src/elements/goo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/goo.c')
-rw-r--r--src/elements/goo.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/elements/goo.c b/src/elements/goo.c
index 0818173..a3176e1 100644
--- a/src/elements/goo.c
+++ b/src/elements/goo.c
@@ -1,15 +1,13 @@
#include <element.h>
int update_GOO(UPDATE_FUNC_ARGS) {
- if (!parts[i].life)
+ if (!parts[i].life && pv[y/CELL][x/CELL]>1.0f)
+ parts[i].life = rand()%80+300;
+ if (parts[i].life)
{
- if (pv[y/CELL][x/CELL]>1.0f)
- {
- float advection = 0.1f;
- parts[i].vx += advection*vx[y/CELL][x/CELL];
- parts[i].vy += advection*vy[y/CELL][x/CELL];
- parts[i].life = rand()%80+300;
- }
+ float advection = 0.1f;
+ parts[i].vx += advection*vx[y/CELL][x/CELL];
+ parts[i].vy += advection*vy[y/CELL][x/CELL];
}
return 0;
}