summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCate <cate@Catelite.(none)>2011-03-24 19:46:12 (GMT)
committer Simon <simon@hardwired.org.uk>2011-03-24 20:10:04 (GMT)
commit175fb60cf7be4554e7f32f1f556db9834fbf8cd3 (patch)
treed4f1fd6f0976b0f417284c09f13a66d1398f88c0 /src
parent7bfe412e2946266be1aa409029c552768765fcc1 (diff)
downloadpowder-175fb60cf7be4554e7f32f1f556db9834fbf8cd3.zip
powder-175fb60cf7be4554e7f32f1f556db9834fbf8cd3.tar.gz
Fixed spacing and fixed "clumping" with quartz generating from life with Cracker help. console: set life qrtz 10000 is very lol
Diffstat (limited to 'src')
-rw-r--r--src/elements/qrtz.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/elements/qrtz.c b/src/elements/qrtz.c
index d40b06d..e585361 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<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 ++)