From 49b1d14aeeb1c81943e975a905b1d67df1162bd2 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 19 Feb 2012 20:59:46 +0000 Subject: Bugfix: Copy paste induced bug found by Sv. Lockal. Thank you for pointing this out! --- intern/smoke/intern/FLUID_3D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/smoke') 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; -- cgit v1.2.3