summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-20 19:38:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-20 19:38:54 +0300
commit5bb61caa784254b1d9c2ccd791feba2bbb2f3023 (patch)
treead327417a7f6be30fd0b033cc7bff2ffb325249e /src/being
parentfbd8b8f2c7d511247c32a62cdeec2089df261688 (diff)
downloadplus-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.tar.gz
plus-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.tar.bz2
plus-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.tar.xz
plus-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.zip
In localplayer rename InvertDirection into MoveType.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp30
-rw-r--r--src/being/localplayer.h16
2 files changed, 23 insertions, 23 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 93d542803..3cd724018 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -112,7 +112,7 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
AttributeListener(),
StatListener(),
mGMLevel(0),
- mInvertDirection(0),
+ mMoveType(0),
mCrazyMoveType(config.getIntValue("crazyMoveType")),
mCrazyMoveState(0),
mAttackWeaponType(config.getIntValue("attackWeaponType")),
@@ -568,7 +568,7 @@ void LocalPlayer::setDestination(const int x, const int y)
// Only send a new message to the server when destination changes
if (x != mDest.x || y != mDest.y)
{
- if (mInvertDirection != 1)
+ if (mMoveType != 1)
{
Net::getPlayerHandler()->setDestination(x, y, mDirection);
Being::setDestination(x, y);
@@ -1237,7 +1237,7 @@ void LocalPlayer::moveToHome()
}
}
-static const unsigned invertDirectionSize = 5;
+static const unsigned moveTypeSize = 5;
void LocalPlayer::changeMode(unsigned *restrict const var,
const unsigned limit,
@@ -1272,14 +1272,14 @@ void LocalPlayer::changeMode(unsigned *restrict const var,
debugMsg(str.substr(4));
}
-void LocalPlayer::invertDirection(const bool forward)
+void LocalPlayer::moveType(const bool forward)
{
mMoveState = 0;
- changeMode(&mInvertDirection, invertDirectionSize, "invertMoveDirection",
- &LocalPlayer::getInvertDirectionString, 0, false, forward);
+ changeMode(&mMoveType, moveTypeSize, "invertMoveDirection",
+ &LocalPlayer::getMoveTypeString, 0, false, forward);
}
-static const char *const invertDirectionStrings[] =
+static const char *const moveTypeStrings[] =
{
// TRANSLATORS: move type in status bar
N_("(D) default moves"),
@@ -1295,10 +1295,10 @@ static const char *const invertDirectionStrings[] =
N_("(?) unknown move")
};
-std::string LocalPlayer::getInvertDirectionString()
+std::string LocalPlayer::getMoveTypeString()
{
- return gettext(getVarItem(&invertDirectionStrings[0],
- mInvertDirection, invertDirectionSize));
+ return gettext(getVarItem(&moveTypeStrings[0],
+ mMoveType, moveTypeSize));
}
static const unsigned crazyMoveTypeSize = 11;
@@ -2671,8 +2671,8 @@ void LocalPlayer::specialMove(const unsigned char direction)
if (direction && (mNavigateX || mNavigateY))
navigateClean();
- if (direction && (mInvertDirection >= 2
- && mInvertDirection <= 4)
+ if (direction && (mMoveType >= 2
+ && mMoveType <= 4)
&& !mIsServerBuggy)
{
if (mAction == BeingAction::MOVE)
@@ -2680,9 +2680,9 @@ void LocalPlayer::specialMove(const unsigned char direction)
int max;
- if (mInvertDirection == 2)
+ if (mMoveType == 2)
max = 5;
- else if (mInvertDirection == 4)
+ else if (mMoveType == 4)
max = 1;
else
max = 3;
@@ -3724,7 +3724,7 @@ void LocalPlayer::checkNewName(Being *const being)
void LocalPlayer::resetYellowBar()
{
- mInvertDirection = 0;
+ mMoveType = 0;
mCrazyMoveType = config.resetIntValue("crazyMoveType");
mMoveToTargetType = config.resetIntValue("moveToTargetType");
mFollowMode = config.resetIntValue("followMode");
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 920a242e8..453781e2b 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -186,13 +186,13 @@ class LocalPlayer final : public Being,
bool isPathSetByMouse() const A_WARN_UNUSED
{ return mPathSetByMouse; }
- int getInvertDirection() const A_WARN_UNUSED
- { return mInvertDirection; }
+ int getMoveType() const A_WARN_UNUSED
+ { return mMoveType; }
- void setInvertDirection(const int n)
- { mInvertDirection = n; }
+ void setMoveType(const int n)
+ { mMoveType = n; }
- void invertDirection(const bool forward);
+ void moveType(const bool forward);
int getAttackWeaponType() const A_WARN_UNUSED
{ return mAttackWeaponType; }
@@ -451,7 +451,7 @@ class LocalPlayer final : public Being,
void setTestParticle(const std::string &fileName,
const bool updateHash = true);
- std::string getInvertDirectionString();
+ std::string getMoveTypeString();
std::string getCrazyMoveTypeString();
@@ -538,7 +538,7 @@ class LocalPlayer final : public Being,
int mGMLevel;
// move type
- unsigned int mInvertDirection;
+ unsigned int mMoveType;
// crazy move type
unsigned int mCrazyMoveType;
// crazy move state
@@ -547,7 +547,7 @@ class LocalPlayer final : public Being,
unsigned int mAttackWeaponType;
// quick drop counter
unsigned int mQuickDropCounter;
- // move state. used if mInvertDirection == 2
+ // move state. used if mMoveType == 2
unsigned int mMoveState;
// pick up type 1x1, normal aka 2x1, forward aka 2x3, 3x3, 3x3 + 1
unsigned int mPickUpType;