Fixed spacing and fixed "clumping" with quartz generating from life with Cracker help. console: set life qrtz 10000 is very lol

This commit is contained in:
Cate 2011-03-24 15:46:12 -04:00 committed by Simon
parent 7bfe412e29
commit 175fb60cf7

View File

@ -18,23 +18,21 @@ int update_QRTZ(UPDATE_FUNC_ARGS) {
else if ((r&0xFF)==PT_SLTW && (1>rand()%2500))
{
kill_part(r>>8);
parts[i].life = 1;
parts[i].life ++;
}
}
if (parts[i].life==1)
if (parts[i].life>0)
{
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
if ((r>>8)>=NPART || r)
continue;
np = create_part(-1,x+rx,y+ry,PT_QRTZ);
if (np<0) continue;
parts[np].tmp = parts[i].tmp;
parts[i].life = 0;
if ((r>>8)>=NPART || r || parts[i].life==0) continue;
np = create_part(-1,x+rx,y+ry,PT_QRTZ);
if (np<0) continue;
parts[np].tmp = parts[i].tmp;
parts[i].life = 0;
}
}
for ( trade = 0; trade<9; trade ++)