diff options
| author | Simon <simon@hardwired.org.uk> | 2010-12-30 22:38:27 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-12-30 22:38:27 (GMT) |
| commit | c98099f8df1d9d95e57bb45676a20cf0f7b1db04 (patch) | |
| tree | 81078cfc1c4235806ae606fa111fd5f5cfe24b21 /src | |
| parent | 265b3600789efc8f292d16d2aea666edaac6eeb0 (diff) | |
| parent | 97e7850de591b9855903ab7fc0449374391efa34 (diff) | |
| download | powder-c98099f8df1d9d95e57bb45676a20cf0f7b1db04.zip powder-c98099f8df1d9d95e57bb45676a20cf0f7b1db04.tar.gz | |
Small changes to SING from cracker
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/powder.c b/src/powder.c index df99f13..df9d8b8 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1446,6 +1446,14 @@ void update_particles_i(pixel *vid, int start, int inc) if(y+CELL<YRES) pv[y/CELL+1][x/CELL+1] += 0.1f*(singularity-pv[y/CELL+1][x/CELL+1]); } + if(y+CELL>0 && pv[y/CELL-1][x/CELL]<singularity) + pv[y/CELL-1][x/CELL] += 0.1f*(singularity-pv[y/CELL-1][x/CELL]); + if(x+CELL>0) + { + pv[y/CELL][x/CELL-1] += 0.1f*(singularity-pv[y/CELL][x/CELL-1]); + if(y+CELL>0) + pv[y/CELL-1][x/CELL-1] += 0.1f*(singularity-pv[y/CELL-1][x/CELL-1]); + } } else { @@ -2516,7 +2524,7 @@ void update_particles_i(pixel *vid, int start, int inc) } else - parts[r>>8].type = PT_NONE; + parts[r>>8].type = PT_NONE; #endif } if((r&0xFF)==PT_GUNP && 15>(rand()%1000)) @@ -3647,31 +3655,24 @@ void update_particles_i(pixel *vid, int start, int inc) continue; if(parts[r>>8].type!=PT_DMND&&33>=rand()/(RAND_MAX/100)+1) { - if(parts[r>>8].life >10) + if(parts[r>>8].type==PT_SING && parts[r>>8].life >10) { if(parts[i].life+parts[r>>8].life > 255) - { - if(parts[r>>8].type!=PT_SING && 1>rand()%20000) - { - parts[r>>8].type = PT_SING; - parts[r>>8].life = rand()%50+60; - } continue; - } parts[i].life += parts[r>>8].life; } else { - if(parts[i].life+1 > 255) + if(parts[i].life+3 > 255) { - if(parts[r>>8].type!=PT_SING && 1>rand()%20000) + if(parts[r>>8].type!=PT_SING && 1>rand()%100) { parts[r>>8].type = PT_SING; parts[r>>8].life = rand()%50+60; } continue; } - parts[i].life += 1; + parts[i].life += 3; } parts[i].temp = restrict_flt(parts[r>>8].temp+parts[i].temp, MIN_TEMP, MAX_TEMP); parts[r>>8].type=PT_NONE; |
