Kimpoomisia lis??
authorekku
Fri, 21 Nov 2008 22:42:55 +0000
changeset 93 05a69f3f2ed4
parent 92 fe9da348afed
child 94 08bebac3d0c2
Kimpoomisia lis??
src/proto2/Physics.cc
--- a/src/proto2/Physics.cc	Fri Nov 21 22:31:23 2008 +0000
+++ b/src/proto2/Physics.cc	Fri Nov 21 22:42:55 2008 +0000
@@ -110,7 +110,22 @@
 				this->velocity.x *= -0.5;
             	break;
 			}
-        }
+        }     
+		
+		// This col. det. doesn't let worms inside the ground, but on the other hand the worms get often stuck
+		/*
+		if(world.getType(tmpVector+shape[0]) != EMPTY || (world.getType(tmpVector+shape[2]))) {
+            reached = position + unitVector*(i-1);
+            collided = true;
+			this->velocity.y *= -0.3;
+            break;
+        } else if(world.getType(tmpVector+shape[1]) != EMPTY || (world.getType(tmpVector+shape[3]))) {
+            reached = position + unitVector*(i-1);
+            collided = true;
+			this->velocity.x *= -0.5;
+            break;
+		}
+		*/
 			//Engine::log(DEBUG, "physics.update_position") << "didnt hit";
     }