Commits

Xiangquan Xiao  committed 825353e

gsoc12-terrain: Fix the VS2010 release error

  • Participants
  • Parent commits b95b4c9

Comments (0)

Files changed (1)

File Components/Terrain/src/OgreTerrain.cpp

 			float rx = (float(x % skip) / skip);
 			float ry = (float(y % skip) / skip);
 
-			return mHeightData[y1 * mSize + x1] * (1.0 - rx) * (1.0 - ry) +
-				  mHeightData[y1 * mSize + x2] * rx * (1.0 - ry) +
-				  mHeightData[y2 * mSize + x1] * (1.0 - rx) * ry +
-				  mHeightData[y2 * mSize + x2] * rx * ry;
+			return *getHeightData(x1, y1) * (1.0f-rx) * (1.0f-ry)
+				+ *getHeightData(x2, y1) * rx * (1.0f-ry)
+				+ *getHeightData(x1, y2) * (1.0f-rx) * ry
+				+ *getHeightData(x2, y2) * rx * ry;
 		}
 		return *getHeightData(x, y);
 	}