diff options
| author | Phil <cracker642@gmail.com> | 2010-09-12 00:17:52 (GMT) |
|---|---|---|
| committer | Phil <cracker642@gmail.com> | 2010-09-12 00:17:52 (GMT) |
| commit | f94986a3bacc60bc3b571209130611437fe9dabc (patch) | |
| tree | 2ee6005daa51f461a421d0faf62e34b3394c14d0 /powder.c | |
| parent | e5e6006bc86e75a5d075fdccb3c1719352185bfc (diff) | |
| download | powder-f94986a3bacc60bc3b571209130611437fe9dabc.zip powder-f94986a3bacc60bc3b571209130611437fe9dabc.tar.gz | |
updated to simon's latest
Diffstat (limited to 'powder.c')
| -rw-r--r-- | powder.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -63,7 +63,7 @@ int try_move(int i, int x, int y, int nx, int ny) { return 1; } - if(bmap[ny/CELL][nx/CELL]==20 && ptypes[parts[i].type].falldown!=0 && parts[i].type!=PT_FIRE) + if(bmap[ny/CELL][nx/CELL]==20 && ptypes[parts[i].type].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE) { return 0; } @@ -247,6 +247,8 @@ inline int create_part(int p, int x, int y, int t) parts[i].life = rand()%120+240; if(t==PT_NBLE) parts[i].life = 0; + if(t==PT_ICEI) + parts[i].ctype = PT_WATR; if(t==PT_NEUT) { float r = (rand()%128+128)/127.0f; @@ -526,6 +528,7 @@ void update_particles_i(pixel *vid, int start, int inc) (bmap[y/CELL][x/CELL]==9) || (bmap[y/CELL][x/CELL]==8 && ptypes[t].falldown!=2) || (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=1) || + (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE) || (bmap[y/CELL][x/CELL]==4 && (t==PT_METL || t==PT_SPRK)) || (bmap[y/CELL][x/CELL]==3 && !emap[y/CELL][x/CELL])) && (t!=PT_STKM))) { @@ -712,6 +715,8 @@ void update_particles_i(pixel *vid, int start, int inc) int ctemp = pv[y/CELL][x/CELL]*2; c_heat = 0.0f; h_count = 0; + if(t==PT_ICEI && !parts[i].ctype) + parts[i].ctype = PT_WATR; if(ptypes[t].hconduct>(rand()%250)) { for(nx=-1; nx<2; nx++) @@ -833,11 +838,11 @@ void update_particles_i(pixel *vid, int start, int inc) pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); } } - if(t==PT_PTCT&&parts[i].temp>249.0f) + if(t==PT_PTCT&&parts[i].temp>295.0f) { pt = parts[i].temp -= 2.5f; } - if(t==PT_NTCT&&parts[i].temp>249.0f) + if(t==PT_NTCT&&parts[i].temp>295.0f) { pt = parts[i].temp -= 2.5f; } |
