summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-04-09 01:30:49 +0300
committerAndrei Karas <akaras@inbox.ru>2019-04-09 01:30:49 +0300
commit6eb1f6e52f6504455123dc73ac4c255fbbe13919 (patch)
treeb05e9dd67403a318154ec1dbfe9f2d3b512b5303 /src
parent010455ce5fc860f41448537e14f30a8453ce5150 (diff)
downloadmanaverse-6eb1f6e52f6504455123dc73ac4c255fbbe13919.tar.gz
manaverse-6eb1f6e52f6504455123dc73ac4c255fbbe13919.tar.bz2
manaverse-6eb1f6e52f6504455123dc73ac4c255fbbe13919.tar.xz
manaverse-6eb1f6e52f6504455123dc73ac4c255fbbe13919.zip
Fix code style
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 646125f19..55808ecda 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -153,13 +153,7 @@ LocalPlayer::LocalPlayer(const BeingId id,
mTestParticleName(),
mTestParticleTime(0),
mTestParticleHash(0L),
-#ifdef TMWA_SUPPORT
- mSyncPlayerMoveDistance(Net::getNetworkType() == ServerType::TMWATHENA ?
- config.getIntValue("syncPlayerMoveDistanceLegacy") :
- config.getIntValue("syncPlayerMoveDistance")),
-#else
mSyncPlayerMoveDistance(config.getIntValue("syncPlayerMoveDistance")),
-#endif
mUnfreezeTime(0),
mWalkingDir(0),
mUpdateName(true),
@@ -189,6 +183,14 @@ LocalPlayer::LocalPlayer(const BeingId id,
{
logger->log1("LocalPlayer::LocalPlayer");
+#ifdef TMWA_SUPPORT
+ if (Net::getNetworkType() == ServerType::TMWATHENA)
+ {
+ mSyncPlayerMoveDistance =
+ config.getIntValue("syncPlayerMoveDistanceLegacy");
+ }
+#endif
+
postInit(subType, nullptr);
mAttackRange = 0;
mLevel = 1;
@@ -1138,13 +1140,19 @@ void LocalPlayer::optionChanged(const std::string &value)
#ifdef TMWA_SUPPORT
if (Net::getNetworkType() != ServerType::TMWATHENA)
#endif
- mSyncPlayerMoveDistance = config.getIntValue("syncPlayerMoveDistance");
+ {
+ mSyncPlayerMoveDistance =
+ config.getIntValue("syncPlayerMoveDistance");
+ }
}
#ifdef TMWA_SUPPORT
else if (value == "syncPlayerMoveDistanceLegacy")
{
if (Net::getNetworkType() == ServerType::TMWATHENA)
- mSyncPlayerMoveDistance = config.getIntValue("syncPlayerMoveDistanceLegacy");
+ {
+ mSyncPlayerMoveDistance =
+ config.getIntValue("syncPlayerMoveDistanceLegacy");
+ }
}
#endif
else if (value == "drawPath")