summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-27 14:11:45 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-27 14:11:45 (GMT)
commit072cfe67aa69466d8ed9afcca705334e036f24df (patch)
tree493693b695ab2f3dec8177c8314309b4d0b04aae /src/simulation
parentdd2fc64793039f696c1afa34a80b54b95ea687f2 (diff)
downloadpowder-072cfe67aa69466d8ed9afcca705334e036f24df.zip
powder-072cfe67aa69466d8ed9afcca705334e036f24df.tar.gz
Missing part of TPT commit 04a09d997, for TTAN, nt and surround_space is now from 0 to 8
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/Simulation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 823f51c..505feb0 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -3511,16 +3511,16 @@ void Simulation::update_particles_i(int start, int inc)
#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 (ny=-1; ny<2; ny++) {
if (nx||ny) {
surround[j] = r = pmap[y+ny][x+nx];
j++;
if (!(r&0xFF))
- surround_space = 1;//there is empty space
+ surround_space++;//there is empty space
if ((r&0xFF)!=t)
- nt = 1;//there is nothing or a different particle
+ nt++;//there is nothing or a different particle
}
}