diff options
| author | Simon 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) |
| commit | ceb25440cbbb1c6b712985770a0379c4da57cdd4 (patch) | |
| tree | 8a629af12bff3226c9368a9975bc7150a1aa9e4a /src/simulation/Simulation.cpp | |
| parent | c4bace95bf97546ecb2fff4343fe82d0540d34ab (diff) | |
| download | powder-ceb25440cbbb1c6b712985770a0379c4da57cdd4.zip powder-ceb25440cbbb1c6b712985770a0379c4da57cdd4.tar.gz | |
TPT: Fix sponge bug. f93a829671
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 7 |
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; |
