Skip to content

Commit 19f73e4

Browse files
asl97BlockMen
authored andcommittedDec 15, 2015
Get movement setting instead of hard coded value
1 parent c26eb87 commit 19f73e4

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed
 

‎src/player.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,23 @@ void Player::clearHud()
261261
}
262262
}
263263

264+
RemotePlayer::RemotePlayer(IGameDef *gamedef, const char *name):
265+
Player(gamedef, name),
266+
m_sao(NULL)
267+
{
268+
movement_acceleration_default = g_settings->getFloat("movement_acceleration_default") * BS;
269+
movement_acceleration_air = g_settings->getFloat("movement_acceleration_air") * BS;
270+
movement_acceleration_fast = g_settings->getFloat("movement_acceleration_fast") * BS;
271+
movement_speed_walk = g_settings->getFloat("movement_speed_walk") * BS;
272+
movement_speed_crouch = g_settings->getFloat("movement_speed_crouch") * BS;
273+
movement_speed_fast = g_settings->getFloat("movement_speed_fast") * BS;
274+
movement_speed_climb = g_settings->getFloat("movement_speed_climb") * BS;
275+
movement_speed_jump = g_settings->getFloat("movement_speed_jump") * BS;
276+
movement_liquid_fluidity = g_settings->getFloat("movement_liquid_fluidity") * BS;
277+
movement_liquid_fluidity_smooth = g_settings->getFloat("movement_liquid_fluidity_smooth") * BS;
278+
movement_liquid_sink = g_settings->getFloat("movement_liquid_sink") * BS;
279+
movement_gravity = g_settings->getFloat("movement_gravity") * BS;
280+
}
264281

265282
void RemotePlayer::save(std::string savedir)
266283
{

‎src/player.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,7 @@ class Player
424424
class RemotePlayer : public Player
425425
{
426426
public:
427-
RemotePlayer(IGameDef *gamedef, const char *name):
428-
Player(gamedef, name),
429-
m_sao(NULL)
430-
{}
427+
RemotePlayer(IGameDef *gamedef, const char *name);
431428
virtual ~RemotePlayer() {}
432429

433430
void save(std::string savedir);

0 commit comments

Comments
 (0)
Please sign in to comment.