some cleanups in the sprite class, increased delta for collision response
[supertux.git] / lib / special / collision_hit.h
index 0689659..6e098ea 100644 (file)
@@ -30,10 +30,15 @@ namespace SuperTux
  */
 enum HitResponse
 {
-  ABORT_MOVE,   // don't move the object
-  FORCE_MOVE,   // do the move ignoring the collision
-  CONTINUE      // move object out of collision and check for collisions again
-                // if this happens to often then the move will just be aborted
+  // note: keep the elements in this order
+
+  /// don't move the object
+  ABORT_MOVE = 0,
+  /// move object out of collision and check for collisions again
+  /// if this happens to often then the move will just be aborted    
+  CONTINUE,
+  /// do the move ignoring the collision
+  FORCE_MOVE
 };
 
 /**
@@ -44,7 +49,9 @@ class CollisionHit
 public:
   /// penetration depth
   float depth;
-  // The normal of the side we collided with
+  /// time of the collision (between 0 and 1 in relation to movement)
+  float time;
+  /// The normal of the side we collided with
   Vector normal;
 };