diff options
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; |