--- a/src/proto2/Physics.cc Sun Nov 30 14:58:48 2008 +0000
+++ b/src/proto2/Physics.cc Sun Nov 30 15:15:17 2008 +0000
@@ -280,10 +280,20 @@
* Computes hitten wall's normal. Calculated from 3*3 grid
*/
Vector PhysicsWorld::getNormal (Vector hitPoint, Vector prevPoint) {
+ // Why doesn't this work
+ Vector normal(0,0);
+ for (int i = 0; i < 8; i++) {
+ if (getType(hitPoint+DIRECTIONS[i]) == EMPTY)
+ normal += DIRECTIONS[i];
+ }
+ return normal;
+
+ /*
// Search free points with bfs and put them to vector
std::vector<Vector> frees;
Vector hit(hitPoint);
- Vector prev(prevPoint);
+ Vector pre(prevPoint);
+
assert(hit != prev);
@@ -312,6 +322,7 @@
}
Engine::log(DEBUG, "physics.getNormal ") << "normal: " << normal;
return normal;
+ */
}
/**