From 072cfe67aa69466d8ed9afcca705334e036f24df Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Mon, 27 Aug 2012 15:11:45 +0100 Subject: [PATCH] Missing part of TPT commit 04a09d997, for TTAN, nt and surround_space is now from 0 to 8 --- src/simulation/Simulation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 823f51cb4..505feb06a 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 } }