summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorjak1 <mike.wollmann@gmail.com>2020-11-04 09:34:16 +0100
committerjak1 <mike.wollmann@gmail.com>2021-03-11 22:17:31 +0000
commit90b77f4c3939f1da10c7a21a182e913ff0e2ec1d (patch)
tree37c8a46d366a441eb121de8646b8054e8b6cf851 /src/being/being.cpp
parent7124d95d082d77b7e00447a4ecad094e575e8fa9 (diff)
downloadplus-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.tar.gz
plus-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.tar.bz2
plus-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.tar.xz
plus-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.zip
added desync walkaround
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 072d1f30a..b12b00c08 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -140,6 +140,7 @@ bool Being::mEnableReorderSprites = true;
bool Being::mHideErased = false;
Move Being::mMoveNames = Move_false;
bool Being::mUseDiagonal = true;
+int Being::mPlayerSpeedAdjustment = 0;
BadgeDrawType::Type Being::mShowBadges = BadgeDrawType::Top;
int Being::mAwayEffect = -1;
VisibleNamePos::Type Being::mVisibleNamePos = VisibleNamePos::Bottom;
@@ -1812,6 +1813,9 @@ void Being::nextTile() restrict2
mSpeed = mWalkSpeed;
}
+ if (this == localPlayer)
+ mSpeed = mSpeed + mPlayerSpeedAdjustment;
+
if (mX != pos.x || mY != pos.y)
{
mOldHeight = mMap->getHeightOffset(mX, mY);
@@ -3448,6 +3452,8 @@ void Being::reReadConfig()
mHideErased = config.getBoolValue("hideErased");
mMoveNames = fromBool(config.getBoolValue("moveNames"), Move);
mUseDiagonal = config.getBoolValue("useDiagonalSpeed");
+ mPlayerSpeedAdjustment =
+ serverConfig.getIntValue("playerSpeedAdjustment");
mShowBadges = static_cast<BadgeDrawType::Type>(
config.getIntValue("showBadges"));
mVisibleNamePos = static_cast<VisibleNamePos::Type>(