diff options
author | jak1 <mike.wollmann@gmail.com> | 2020-11-04 09:34:16 +0100 |
---|---|---|
committer | jak1 <mike.wollmann@gmail.com> | 2021-03-11 22:17:31 +0000 |
commit | 90b77f4c3939f1da10c7a21a182e913ff0e2ec1d (patch) | |
tree | 37c8a46d366a441eb121de8646b8054e8b6cf851 /src/being | |
parent | 7124d95d082d77b7e00447a4ecad094e575e8fa9 (diff) | |
download | manaverse-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.tar.gz manaverse-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.tar.bz2 manaverse-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.tar.xz manaverse-90b77f4c3939f1da10c7a21a182e913ff0e2ec1d.zip |
added desync walkaround
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 6 | ||||
-rw-r--r-- | src/being/being.h | 1 |
2 files changed, 7 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>( diff --git a/src/being/being.h b/src/being/being.h index 0dd0a5743..1431aeab3 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -1348,6 +1348,7 @@ class Being notfinal : public ActorSprite, static bool mHideErased; static Move mMoveNames; static bool mUseDiagonal; + static int mPlayerSpeedAdjustment; static BadgeDrawType::Type mShowBadges; static int mAwayEffect; static VisibleNamePos::Type mVisibleNamePos; |