diff options
| author | Philip <philip@philip-linuxlaptop.(none)> | 2010-11-22 20:54:35 (GMT) |
|---|---|---|
| committer | Philip <philip@philip-linuxlaptop.(none)> | 2010-11-22 20:54:35 (GMT) |
| commit | 50f4da5996e14828708788928713735b8de85cb0 (patch) | |
| tree | 452d611ad883e473f3c138ecd39b271941e46652 /src | |
| parent | 60e4c076cbb84c457573417cda5e1659b106bf83 (diff) | |
| download | powder-50f4da5996e14828708788928713735b8de85cb0.zip powder-50f4da5996e14828708788928713735b8de85cb0.tar.gz | |
plnt eats smoke and gives off o2. GLAS acts as insulation for acid, kind of
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c index dac227f..85ffce6 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1779,9 +1779,29 @@ void update_particles_i(pixel *vid, int start, int inc) parts[i].life = 4; t = parts[i].type = PT_FIRE; } + else if((r&0xFF)==PT_SMKE && (1>rand()%250)) + { + parts[r>>8].type = PT_NONE; + parts[i].life = rand()%60 + 60; + } //if(t==PT_SNOW && (r&0xFF)==PT_WATR && 15>(rand()%1000)) //t = parts[i].type = PT_WATR; } + if(parts[i].life==2) + { + for(nx=-1; nx<2; nx++) + for(ny=-1; ny<2; ny++) + if(x+nx>=0 && y+ny>0 && + x+nx<XRES && y+ny<YRES && (nx || ny)) + { + r = pmap[y+ny][x+nx]; + if((r>>8)>=NPART) + continue; + if(!r) + create_part(-1,x+nx,y+ny,PT_O2); + } + parts[i].life = 0; + } } else if(t==PT_THRM) { @@ -1939,7 +1959,7 @@ void update_particles_i(pixel *vid, int start, int inc) parts[r>>8].type = PT_FIRE; parts[r>>8].life = 4; } - else if(((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && ptypes[parts[r>>8].type].hardness>(rand()%1000))&&parts[i].life>=50) + else if(((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && ptypes[parts[r>>8].type].hardness>(rand()%1000))&&parts[i].life>=50&&parts_avg(i,r>>8) != PT_GLAS) { parts[i].life--; parts[r>>8].type = PT_NONE; |
