summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-19 15:52:35 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-19 15:52:35 (GMT)
commitceb25440cbbb1c6b712985770a0379c4da57cdd4 (patch)
tree8a629af12bff3226c9368a9975bc7150a1aa9e4a /src/simulation/Simulation.cpp
parentc4bace95bf97546ecb2fff4343fe82d0540d34ab (diff)
downloadpowder-ceb25440cbbb1c6b712985770a0379c4da57cdd4.zip
powder-ceb25440cbbb1c6b712985770a0379c4da57cdd4.tar.gz
TPT: Fix sponge bug. f93a829671
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 2ad007b..e2f9880 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2573,8 +2573,11 @@ void Simulation::update_particles_i(int start, int inc)
pGravY += gravy[(y/CELL)*(XRES/CELL)+(x/CELL)];
}
//velocity updates for the particle
- parts[i].vx *= ptypes[t].loss;
- parts[i].vy *= ptypes[t].loss;
+ if (!(parts[i].flags&FLAG_MOVABLE))
+ {
+ parts[i].vx *= ptypes[t].loss;
+ parts[i].vy *= ptypes[t].loss;
+ }
//particle gets velocity from the vx and vy maps
parts[i].vx += ptypes[t].advection*vx[y/CELL][x/CELL] + pGravX;
parts[i].vy += ptypes[t].advection*vy[y/CELL][x/CELL] + pGravY;