summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-05 21:55:20 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-05 21:55:20 +0300
commit5413a9e7c761dc80cf33dbee8593b8721c1539b6 (patch)
tree3fd9b01c8d4d3d75b02b4fec531927b282b7df29 /src/being/being.cpp
parentac01c186d37b14da92314ff44b4e043b0c0ee31b (diff)
downloadplus-5413a9e7c761dc80cf33dbee8593b8721c1539b6.tar.gz
plus-5413a9e7c761dc80cf33dbee8593b8721c1539b6.tar.bz2
plus-5413a9e7c761dc80cf33dbee8593b8721c1539b6.tar.xz
plus-5413a9e7c761dc80cf33dbee8593b8721c1539b6.zip
add option to use special diagonal moving speed.
By default option enabled.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 73652bb1a..d773e68ca 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -89,6 +89,7 @@ bool Being::mShowPlayersStatus = false;
bool Being::mEnableReorderSprites = true;
bool Being::mHideErased = false;
bool Being::mMoveNames = false;
+bool Being::mUseDiagonal = true;
int Being::mAwayEffect = -1;
std::list<BeingCacheEntry*> beingInfoCache;
@@ -1347,7 +1348,7 @@ void Being::nextTile()
}
mActionTime += static_cast<int>(mSpeed / 10);
- if (mX != pos.x && mY != pos.y)
+ if ((mType != PLAYER || mUseDiagonal) && mX != pos.x && mY != pos.y)
mSpeed = mWalkSpeed.x * 1.4;
else
mSpeed = mWalkSpeed.x;
@@ -2034,6 +2035,7 @@ void Being::reReadConfig()
mEnableReorderSprites = config.getBoolValue("enableReorderSprites");
mHideErased = config.getBoolValue("hideErased");
mMoveNames = config.getBoolValue("moveNames");
+ mUseDiagonal = config.getBoolValue("useDiagonalSpeed");
mUpdateConfigTime = cur_time;
}