--- a/src/Terrain.cc Mon Dec 15 15:36:17 2008 +0000
+++ b/src/Terrain.cc Mon Dec 15 16:41:00 2008 +0000
@@ -349,7 +349,7 @@
assert(point != prevPoint);
- Vector normal(0,0);
+ Vector normal(0, 0);
// These two must be rounded separately
int dirIdx = getDirectionIndex(prevPoint.roundToInt() - point.roundToInt());
@@ -357,14 +357,14 @@
normal += DIRECTIONS[dirIdx];
for (int i = 1; i <= 2; i++) {
- if (getType(point + DIRECTIONS[(dirIdx+i+8)%8]) == TERRAIN_EMPTY) {
- normal += DIRECTIONS[(dirIdx+i+8)%8];
+ if (getType(point + DIRECTIONS[(dirIdx + i + 8) % 8]) == TERRAIN_EMPTY) {
+ normal += DIRECTIONS[(dirIdx + i + 8) % 8];
}
}
for (int i = 1; i <= 2; i++) {
- if (getType(point + DIRECTIONS[(dirIdx-i+8)%8]) == TERRAIN_EMPTY) {
- normal += DIRECTIONS[(dirIdx-i+8)%8];
+ if (getType(point + DIRECTIONS[(dirIdx - i + 8) % 8]) == TERRAIN_EMPTY) {
+ normal += DIRECTIONS[(dirIdx - i + 8) % 8];
}
}