Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix player controls only being applied for the first move
  • Loading branch information
TheTermos authored and sfan5 committed Jul 7, 2020
1 parent 6e4d8de commit ebb721a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/client/client.cpp
Expand Up @@ -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);

Expand Down
3 changes: 3 additions & 0 deletions src/client/clientenvironment.cpp
Expand Up @@ -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
Expand Down

0 comments on commit ebb721a

Please sign in to comment.