]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Entity.h
implemented pushable entities and pushing
[l2e.git] / src / map / Entity.h
index 13ecacac627eb021ee9f35ede96db8b739e6ea8f..fc1dc812194d5332e415e37501a35b90bc690301 100644 (file)
@@ -34,6 +34,8 @@ public:
        };
        enum Flags {
                FLAG_NONBLOCKING = 0x01,
+               FLAG_PUSHABLE = 0x02,
+               FLAG_FIXED_ORIENTATION = 0x04,
        };
 
 public:
@@ -52,13 +54,21 @@ public:
        void StopAnimation();
        bool AnimationRunning() const { return runner.Running(); }
 
+       void SetSprite(const graphics::Sprite *s) { sprite = s; }
+
        void SetOrientation(Orientation);
        Orientation GetOrientation() const { return orientation; }
        void SetSpeed(float);
 
+       void SetHandsFree();
+       void SetCarrying();
+       void SetPushing();
+
        void SetFlags(int f) { flags = f; }
        bool Blocking() const { return !(flags & FLAG_NONBLOCKING); }
        bool Hostile() const { return partyLayout && numMonsters > 0; }
+       bool Pushable() const { return flags & FLAG_PUSHABLE; }
+       bool CanTurn() const { return !(flags & FLAG_FIXED_ORIENTATION); }
 
        void SetPartyLayout(battle::PartyLayout *l) { partyLayout = l; }
        battle::PartyLayout *PartyLayout() { return partyLayout; }
@@ -88,6 +98,7 @@ private:
 private:
        Entity *follower;
        const graphics::Animation *animation;
+       const graphics::Sprite *sprite;
        battle::PartyLayout *partyLayout;
        battle::Monster *monsters;
        int numMonsters;