Implemented mirror actions correctly. Bugfix: right direction of bad guys now working.
[supertux.git] / lib / math / vector.h
index 8e8555d..dac4c95 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef SUPERTUX_VECTOR_H
 #define SUPERTUX_VECTOR_H
 
+#include "../special/base.h"
+
 namespace SuperTux
   {
 
@@ -34,6 +36,9 @@ namespace SuperTux
       Vector(const Vector& other)
           : x(other.x), y(other.y)
       { }
+      Vector(const base_type& base)
+          : x(base.x), y(base.y)
+      { }
       Vector()
           : x(0), y(0)
       { }
@@ -43,6 +48,11 @@ namespace SuperTux
           return x == other.x && y == other.y;
         }
 
+      bool operator !=(const Vector& other) const
+        {
+          return !(x == other.x && y == other.y);
+        }
+
       const Vector& operator=(const Vector& other)
       {
         x = other.x;