2011-01-28 13:34:16 -06:00
|
|
|
#include <element.h>
|
2011-01-07 14:03:58 -06:00
|
|
|
|
2011-01-10 08:41:03 -06:00
|
|
|
int update_ISZ(UPDATE_FUNC_ARGS) { // for both ISZS and ISOZ
|
2011-01-07 14:03:58 -06:00
|
|
|
float rr, rrr;
|
|
|
|
if (1>rand()%200 && ((int)(-4.0f*(pv[y/CELL][x/CELL])))>(rand()%1000))
|
2011-01-07 14:26:09 -06:00
|
|
|
{
|
2011-01-10 08:41:03 -06:00
|
|
|
create_part(i, x, y, PT_PHOT);
|
2011-01-07 14:26:09 -06:00
|
|
|
rr = (rand()%228+128)/127.0f;
|
|
|
|
rrr = (rand()%360)*3.14159f/180.0f;
|
|
|
|
parts[i].vx = rr*cosf(rrr);
|
|
|
|
parts[i].vy = rr*sinf(rrr);
|
|
|
|
}
|
2011-01-07 14:03:58 -06:00
|
|
|
return 0;
|
|
|
|
}
|