[Bf-blender-cvs] [270cee3d4a4] functions: fix old particle removal
Jacques Lucke
noreply at git.blender.org
Sat Jun 8 14:22:08 CEST 2019
Commit: 270cee3d4a4b89bbd2d4926855492025f5dc2ba7
Author: Jacques Lucke
Date: Sat Jun 8 14:02:51 2019 +0200
Branches: functions
https://developer.blender.org/rB270cee3d4a4b89bbd2d4926855492025f5dc2ba7
fix old particle removal
===================================================================
M source/blender/simulations/bparticles/playground_solver.cpp
===================================================================
diff --git a/source/blender/simulations/bparticles/playground_solver.cpp b/source/blender/simulations/bparticles/playground_solver.cpp
index d291a48d914..a124d403ed8 100644
--- a/source/blender/simulations/bparticles/playground_solver.cpp
+++ b/source/blender/simulations/bparticles/playground_solver.cpp
@@ -75,18 +75,13 @@ class SimpleSolver : public Solver {
uint index = 0;
while (index < block->active_amount()) {
- if (state.seconds_since_start - 3 < birth_time[index]) {
- index++;
- continue;
- }
-
- if (state.seconds_since_start - 3 < birth_time[block->active_amount() - 1]) {
+ if (state.seconds_since_start - 3 > birth_time[index]) {
+ block->move(block->active_amount() - 1, index);
block->active_amount() -= 1;
- continue;
}
- block->move(block->active_amount() - 1, index);
- index++;
- block->active_amount() -= 1;
+ else {
+ index++;
+ }
}
}
More information about the Bf-blender-cvs
mailing list