From 175fb60cf7be4554e7f32f1f556db9834fbf8cd3 Mon Sep 17 00:00:00 2001 From: Cate Date: Thu, 24 Mar 2011 15:46:12 -0400 Subject: [PATCH] Fixed spacing and fixed "clumping" with quartz generating from life with Cracker help. console: set life qrtz 10000 is very lol --- src/elements/qrtz.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/elements/qrtz.c b/src/elements/qrtz.c index d40b06d4c..e585361e1 100644 --- a/src/elements/qrtz.c +++ b/src/elements/qrtz.c @@ -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>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 ++)