Convection
This commit is contained in:
parent
6eafb157de
commit
b83b2f1d27
16
src/powder.c
16
src/powder.c
@ -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;
|
||||||
|
Reference in New Issue
Block a user