Fixed problems with Rockets and Cannons sometimes reversing direction on
[supertux.git] / src / badguy / badguy.hpp
index ebcee69..0b8d8de 100644 (file)
@@ -42,6 +42,7 @@ class BadGuy : public MovingSprite, public Serializable
 {
 public:
   BadGuy(const Vector& pos, const std::string& sprite_name, int layer = LAYER_OBJECTS);
+  BadGuy(const Vector& pos, Direction direction, const std::string& sprite_name, int layer = LAYER_OBJECTS);
   BadGuy(const lisp::Lisp& reader, const std::string& sprite_name, int layer = LAYER_OBJECTS);
 
   /** Called when the badguy is drawn. The default implementation simply draws
@@ -154,9 +155,17 @@ protected:
 
   Vector start_position;
 
+  /**
+   * The direction we currently face in
+   */
   Direction dir;
 
   /**
+   * The direction we initially faced in
+   */
+  Direction start_dir;
+
+  /**
    *  Get Direction from String.
    */ 
   Direction str2dir( std::string dir_str );