summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/being/being.h b/src/being/being.h
index aec735215..52a88bd2e 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -29,6 +29,7 @@
#include "listeners/configlistener.h"
+#include "being/beingaction.h"
#include "being/beingdirection.h"
#include "being/beingflag.h"
#include "being/gender.h"
@@ -85,22 +86,6 @@ class Being : public ActorSprite, public ConfigListener
friend class BeingEquipBackend;
friend class LocalPlayer;
- /**
- * Action the being is currently performing
- * WARNING: Has to be in sync with the same enum in the Being class
- * of the server!
- */
- enum Action
- {
- STAND = 0,
- MOVE,
- ATTACK,
- SIT,
- DEAD,
- HURT,
- SPAWN
- };
-
enum AttackType
{
HIT = 0x00,
@@ -469,19 +454,20 @@ class Being : public ActorSprite, public ConfigListener
/**
* Sets the current action.
*/
- virtual void setAction(const Action &action, const int attackType);
+ virtual void setAction(const BeingAction::Action &action,
+ const int attackType);
/**
* Get the being's action currently performed.
*/
- Action getCurrentAction() const A_WARN_UNUSED
+ BeingAction::Action getCurrentAction() const A_WARN_UNUSED
{ return mAction; }
/**
* Returns whether this being is still alive.
*/
bool isAlive() const A_WARN_UNUSED
- { return mAction != DEAD; }
+ { return mAction != BeingAction::DEAD; }
/**
* Returns the current direction.
@@ -968,7 +954,7 @@ class Being : public ActorSprite, public ConfigListener
int mLastAttackX;
int mLastAttackY;
Gender mGender;
- Action mAction; /**< Action the being is performing */
+ BeingAction::Action mAction;
uint16_t mSubType; /**< Subtype (graphical view, basically) */
uint8_t mDirection; /**< Facing direction */
uint8_t mDirectionDelayed; /**< Facing direction */