]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix player controls only being applied for the first move
authorTheTermos <55103816+TheTermos@users.noreply.github.com>
Fri, 3 Jul 2020 15:21:42 +0000 (17:21 +0200)
committersfan5 <sfan5@live.de>
Tue, 7 Jul 2020 17:09:23 +0000 (19:09 +0200)
src/client/client.cpp
src/client/clientenvironment.cpp

index 34f97a9de356fb7abbd9b5b77aa067461e9deca1..65e5b3d8c0267675c8645b2955ad089bed93ac04 100644 (file)
@@ -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);
 
index 44ea1e4a157a53282300c203988bc1e2c9177790..895b0193c5976f9ad7ea4ee91d010bb40922536a 100644 (file)
@@ -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