This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
The-Powder-Toy/src/elements/goo.c
2011-02-22 20:55:09 -05:00

14 lines
297 B
C

#include <element.h>
int update_GOO(UPDATE_FUNC_ARGS) {
if (!parts[i].life && pv[y/CELL][x/CELL]>1.0f)
parts[i].life = rand()%80+300;
if (parts[i].life)
{
float advection = 0.1f;
parts[i].vx += advection*vx[y/CELL][x/CELL];
parts[i].vy += advection*vy[y/CELL][x/CELL];
}
return 0;
}