Fix rapid decrease in pressure with GAS/NBLE

This commit is contained in:
jacksonmj 2011-08-29 01:25:18 +08:00 committed by Simon Robertshaw
parent e1959c0c0b
commit 65445c51f1

View File

@ -1604,8 +1604,9 @@ void update_particles_i(pixel *vid, int start, int inc)
pv[y/CELL+1][x/CELL] += ptypes[t].hotair*(3.5f-pv[y/CELL+1][x/CELL]);
if (x+CELL<XRES)
{
pv[y/CELL][x/CELL+1] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL+1]);
if (y+CELL<YRES)
if (pv[y/CELL][x/CELL+1]<3.5f)
pv[y/CELL][x/CELL+1] += ptypes[t].hotair*(3.5f-pv[y/CELL][x/CELL+1]);
if (y+CELL<YRES && pv[y/CELL+1][x/CELL+1]<3.5f)
pv[y/CELL+1][x/CELL+1] += ptypes[t].hotair*(3.5f-pv[y/CELL+1][x/CELL+1]);
}
}