mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Get movement setting instead of hard coded value
This commit is contained in:
		@@ -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)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user