Missing part of TPT commit 04a09d997, for TTAN, nt and surround_space is now from 0 to 8

This commit is contained in:
Simon Robertshaw 2012-08-27 15:11:45 +01:00
parent dd2fc64793
commit 072cfe67aa

View File

@ -3511,16 +3511,16 @@ void Simulation::update_particles_i(int start, int inc)
#endif #endif
} }
j = surround_space = nt = 0;//if nt is 1 after this, then there is a particle around the current particle, that is NOT the current particle's type, for water movement. j = surround_space = nt = 0;//if nt is greater than 1 after this, then there is a particle around the current particle, that is NOT the current particle's type, for water movement.
for (nx=-1; nx<2; nx++) for (nx=-1; nx<2; nx++)
for (ny=-1; ny<2; ny++) { for (ny=-1; ny<2; ny++) {
if (nx||ny) { if (nx||ny) {
surround[j] = r = pmap[y+ny][x+nx]; surround[j] = r = pmap[y+ny][x+nx];
j++; j++;
if (!(r&0xFF)) if (!(r&0xFF))
surround_space = 1;//there is empty space surround_space++;//there is empty space
if ((r&0xFF)!=t) if ((r&0xFF)!=t)
nt = 1;//there is nothing or a different particle nt++;//there is nothing or a different particle
} }
} }