X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fpath_walker.hpp;h=f3bdf9e6e94818cfe6a4e8c5e3e94052feb39448;hb=ed161bf9da56b598f3db3637c6017fa22e9ab0d7;hp=3766497f215a1f1a90ab73c55506e90663cf5c1f;hpb=a48ee7c0b3e60c9f21499054446aeaeca6914f46;p=supertux.git diff --git a/src/object/path_walker.hpp b/src/object/path_walker.hpp index 3766497f2..f3bdf9e6e 100644 --- a/src/object/path_walker.hpp +++ b/src/object/path_walker.hpp @@ -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