getType -> collides
authorsaiam
Tue, 02 Dec 2008 00:24:01 +0000
changeset 175 c4a6af377a1a
parent 174 073f25a84f60
child 176 9e4e272c2ec6
getType -> collides
src/proto2/Physics.cc
--- a/src/proto2/Physics.cc	Tue Dec 02 00:23:16 2008 +0000
+++ b/src/proto2/Physics.cc	Tue Dec 02 00:24:01 2008 +0000
@@ -139,7 +139,6 @@
     if (!this->inAir) {
         if (total.x != 0)
             this->position = walk(total.x > 0);
-        return; 
         //total.x = 0;
     }
 
@@ -164,7 +163,7 @@
         reached += unitVector;
         // Check if any of the shapes points collide
         for (uint64_t i = 0; i < shape.size(); i++) {
-            if (world.getType(reached+shape[i]) != EMPTY) {  // Collision
+            if (world.collides(reached+shape[i])) {  // Collision
                 if (inAir) {
                     //                    Engine::log(DEBUG, "Here");
                     this->bounce(world.getNormal(reached+shape[i],