Skip to content

Commit ebb721a

Browse files
TheTermossfan5
authored andcommittedJul 7, 2020
Fix player controls only being applied for the first move
1 parent 6e4d8de commit ebb721a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

Diff for: ‎src/client/client.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,9 @@ void Client::step(float dtime)
459459
/*
460460
Handle environment
461461
*/
462-
// Control local player (0ms)
463462
LocalPlayer *player = m_env.getLocalPlayer();
464-
assert(player);
465-
player->applyControl(dtime, &m_env);
466463

467-
// Step environment
464+
// Step environment (also handles player controls)
468465
m_env.step(dtime);
469466
m_sound->step(dtime);
470467

Diff for: ‎src/client/clientenvironment.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ void ClientEnvironment::step(float dtime)
216216
*/
217217

218218
{
219+
// Control local player
220+
lplayer->applyControl(dtime_part, this);
221+
219222
// Apply physics
220223
if (!free_move && !is_climbing) {
221224
// Gravity

0 commit comments

Comments
 (0)
Please sign in to comment.