diff --git a/src/client/client.cpp b/src/client/client.cpp index 34f97a9de..65e5b3d8c 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -459,12 +459,9 @@ void Client::step(float dtime) /* Handle environment */ - // Control local player (0ms) LocalPlayer *player = m_env.getLocalPlayer(); - assert(player); - player->applyControl(dtime, &m_env); - // Step environment + // Step environment (also handles player controls) m_env.step(dtime); m_sound->step(dtime); diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp index 44ea1e4a1..895b0193c 100644 --- a/src/client/clientenvironment.cpp +++ b/src/client/clientenvironment.cpp @@ -216,6 +216,9 @@ void ClientEnvironment::step(float dtime) */ { + // Control local player + lplayer->applyControl(dtime_part, this); + // Apply physics if (!free_move && !is_climbing) { // Gravity