2011-01-28 13:34:16 -06:00
|
|
|
#include <element.h>
|
2011-01-07 18:07:10 -06:00
|
|
|
|
|
|
|
int update_GOO(UPDATE_FUNC_ARGS) {
|
2011-02-09 11:19:48 -06:00
|
|
|
if (!parts[i].life && pv[y/CELL][x/CELL]>1.0f)
|
|
|
|
parts[i].life = rand()%80+300;
|
|
|
|
if (parts[i].life)
|
2011-01-07 18:07:10 -06:00
|
|
|
{
|
2011-02-09 11:19:48 -06:00
|
|
|
float advection = 0.1f;
|
|
|
|
parts[i].vx += advection*vx[y/CELL][x/CELL];
|
|
|
|
parts[i].vy += advection*vy[y/CELL][x/CELL];
|
2011-01-07 18:07:10 -06:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|