summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-06-08 09:28:50 -0600
committerJared Adams <jaxad0127@gmail.com>2009-06-08 09:28:50 -0600
commit8596b1a8102726de0d7b3df12dff86f5c974e6fe (patch)
treee4403af689615f6fe8625beb679538780ecfba67 /src/being.cpp
parentc9f52e60ea7eadca0d11fc0bbf7eb8a6ad465925 (diff)
downloadmana-8596b1a8102726de0d7b3df12dff86f5c974e6fe.tar.gz
mana-8596b1a8102726de0d7b3df12dff86f5c974e6fe.tar.bz2
mana-8596b1a8102726de0d7b3df12dff86f5c974e6fe.tar.xz
mana-8596b1a8102726de0d7b3df12dff86f5c974e6fe.zip
Merge being direction handling code
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 3c77cd2a..657e2236 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -76,9 +76,7 @@ Being::Being(int id, int job, Map *map):
mJob(job),
mId(id),
mDirection(DOWN),
-#ifdef TMWSERV_SUPPORT
mSpriteDirection(DIRECTION_DOWN),
-#endif
mMap(NULL),
mParticleEffects(config.getValue("particleeffects", 1)),
mEquippedWeapon(NULL),
@@ -461,12 +459,12 @@ void Being::setDirection(Uint8 direction)
if (mDirection == direction)
return;
-#ifdef TMWSERV_SUPPORT
+ mDirection = direction;
+
// if the direction does not change much, keep the common component
int mFaceDirection = mDirection & direction;
if (!mFaceDirection)
mFaceDirection = direction;
- mDirection = direction;
SpriteDirection dir;
if (mFaceDirection & UP)
@@ -478,10 +476,6 @@ void Being::setDirection(Uint8 direction)
else
dir = DIRECTION_LEFT;
mSpriteDirection = dir;
-#else
- mDirection = direction;
- SpriteDirection dir = getSpriteDirection();
-#endif
for (int i = 0; i < VECTOREND_SPRITE; i++)
{
@@ -491,22 +485,6 @@ void Being::setDirection(Uint8 direction)
}
#ifdef EATHENA_SUPPORT
-SpriteDirection Being::getSpriteDirection() const
-{
- SpriteDirection dir;
-
- if (mDirection & UP)
- dir = DIRECTION_UP;
- else if (mDirection & DOWN)
- dir = DIRECTION_DOWN;
- else if (mDirection & RIGHT)
- dir = DIRECTION_RIGHT;
- else
- dir = DIRECTION_LEFT;
-
- return dir;
-}
-
void Being::nextStep()
{
if (mPath.empty())