diff options
-rw-r--r-- | intern/smoke/intern/FLUID_3D.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp index d688dbf1dfa..adf43a29790 100644 --- a/intern/smoke/intern/FLUID_3D.cpp +++ b/intern/smoke/intern/FLUID_3D.cpp @@ -1106,7 +1106,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd) float dz = (out == index || in == index) ? 1.0f / _dx : gridSize; int right = _obstacles[index + 1] ? index : index + 1; int left = _obstacles[index - 1] ? index : index - 1; - float dx = (right == index || right == index) ? 1.0f / _dx : gridSize; + float dx = (right == index || left == index) ? 1.0f / _dx : gridSize; _xVorticity[vIndex] = (_zVelocity[up] - _zVelocity[down]) * dy + (-_yVelocity[out] + _yVelocity[in]) * dz; _yVorticity[vIndex] = (_xVelocity[out] - _xVelocity[in]) * dz + (-_zVelocity[right] + _zVelocity[left]) * dx; |