Convection

This commit is contained in:
Simon 2011-01-08 17:38:36 +00:00
parent 6eafb157de
commit b83b2f1d27

View File

@ -1621,8 +1621,8 @@ void update_particles_i(pixel *vid, int start, int inc)
if(t==PT_GAS && pv[y/CELL][x/CELL]<-6.0f) if(t==PT_GAS && pv[y/CELL][x/CELL]<-6.0f)
t = parts[i].type = PT_OIL; t = parts[i].type = PT_OIL;
if(t==PT_DESL && pv[y/CELL][x/CELL]>5.0f) if(t==PT_DESL && pv[y/CELL][x/CELL]>5.0f)
{ // Only way I know to make it {
t = parts[i].type = PT_FIRE; // combust under pressure. t = parts[i].type = PT_FIRE;
parts[i].life = rand()%50+120; parts[i].life = rand()%50+120;
} }
if(t==PT_GAS && pv[y/CELL][x/CELL]>6.0f) if(t==PT_GAS && pv[y/CELL][x/CELL]>6.0f)
@ -1748,6 +1748,18 @@ void update_particles_i(pixel *vid, int start, int inc)
} }
} }
} }
if(y-2 >= 0 && y-2 < YRES && ptypes[t].properties&TYPE_LIQUID){
float swappage;
r = pmap[y-2][x];
if(!((r>>8)>=NPART || !r || parts[i].type != (r&0xFF))){
if(parts[i].temp>parts[r>>8].temp){
swappage = parts[i].temp;
parts[i].temp = parts[r>>8].temp;
parts[r>>8].temp = swappage;
}
}
}
if(pt>=pstates[t].btemp&&pstates[t].burn) if(pt>=pstates[t].btemp&&pstates[t].burn)
{ {
t = parts[i].type = pstates[t].burn; t = parts[i].type = pstates[t].burn;