diff options
author | asl97 <asl97@outlook.com> | 2015-12-02 10:45:57 +0800 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-12-15 23:20:15 +0100 |
commit | 19f73e4efc14622b4d020c9d373176cd7801e37f (patch) | |
tree | 748e1eb86c6fa5d96c92c603aac4a1218bfc1826 | |
parent | c26eb87aec7438d167fa2f460a3f412db09c0ac5 (diff) | |
download | minetest-19f73e4efc14622b4d020c9d373176cd7801e37f.tar.gz minetest-19f73e4efc14622b4d020c9d373176cd7801e37f.tar.bz2 minetest-19f73e4efc14622b4d020c9d373176cd7801e37f.zip |
Get movement setting instead of hard coded value
-rw-r--r-- | src/player.cpp | 17 | ||||
-rw-r--r-- | src/player.h | 5 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp index 3ee34d41f..dd5e04509 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -261,6 +261,23 @@ void Player::clearHud() } } +RemotePlayer::RemotePlayer(IGameDef *gamedef, const char *name): + Player(gamedef, name), + m_sao(NULL) +{ + movement_acceleration_default = g_settings->getFloat("movement_acceleration_default") * BS; + movement_acceleration_air = g_settings->getFloat("movement_acceleration_air") * BS; + movement_acceleration_fast = g_settings->getFloat("movement_acceleration_fast") * BS; + movement_speed_walk = g_settings->getFloat("movement_speed_walk") * BS; + movement_speed_crouch = g_settings->getFloat("movement_speed_crouch") * BS; + movement_speed_fast = g_settings->getFloat("movement_speed_fast") * BS; + movement_speed_climb = g_settings->getFloat("movement_speed_climb") * BS; + movement_speed_jump = g_settings->getFloat("movement_speed_jump") * BS; + movement_liquid_fluidity = g_settings->getFloat("movement_liquid_fluidity") * BS; + movement_liquid_fluidity_smooth = g_settings->getFloat("movement_liquid_fluidity_smooth") * BS; + movement_liquid_sink = g_settings->getFloat("movement_liquid_sink") * BS; + movement_gravity = g_settings->getFloat("movement_gravity") * BS; +} void RemotePlayer::save(std::string savedir) { diff --git a/src/player.h b/src/player.h index c11261876..48b0a4999 100644 --- a/src/player.h +++ b/src/player.h @@ -424,10 +424,7 @@ private: class RemotePlayer : public Player { public: - RemotePlayer(IGameDef *gamedef, const char *name): - Player(gamedef, name), - m_sao(NULL) - {} + RemotePlayer(IGameDef *gamedef, const char *name); virtual ~RemotePlayer() {} void save(std::string savedir); |