play sound when willowisp is caught
[supertux.git] / src / object / path_walker.hpp
index 3766497..f3bdf9e 100644 (file)
@@ -32,7 +32,7 @@
 class PathWalker
 {
 public:
-  PathWalker(const Path* path);
+  PathWalker(const Path* path, bool running = true);
   virtual ~PathWalker();
 
   /**
@@ -55,7 +55,12 @@ public:
 private:
   void advance_node();
   void goback_node();
-  
+
+  /**
+   * set to false to immediately stop advancing
+   */
+  bool running;
+
   size_t current_node_nr;
   size_t next_node_nr;
 
@@ -64,8 +69,6 @@ private:
    */
   int stop_at_node_nr;
 
-  Vector last_pos;
-
   /**
    * the position between the current node and the next node as fraction
    * between 0 and 1