]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.h
begun monster vicinity checking
[l2e.git] / src / map / Entity.h
index 12f22c947aae0c903a2468382c0261217ae76456..872ad0c92ed739ea1e714da24b132d1870223e3d 100644 (file)
@@ -30,6 +30,9 @@ public:
                ORIENTATION_SOUTH = 2,
                ORIENTATION_WEST = 3,
        };
+       enum Flags {
+               FLAG_NONBLOCKING = 0x01,
+       };
 
 public:
        geometry::Vector<float> &Position() { return position; }
@@ -51,6 +54,13 @@ public:
        Orientation GetOrientation() const { return orientation; }
        void SetSpeed(float);
 
+       void SetFlags(int f) { flags = f; }
+       bool Blocking() const { return !(flags & FLAG_NONBLOCKING); }
+       bool Hostile() const {
+               // NOTE: this is a stub for testing!
+               return Blocking();
+       }
+
        Entity *Follower() { return follower; }
        const Entity *Follower() const { return follower; }
        void AddFollower(Entity *);
@@ -74,6 +84,7 @@ private:
        geometry::Vector<float> velocity;
        Orientation orientation;
        float speed;
+       int flags;
 
 };