Skip to content
Permalink
Browse files

Fix isDead()/autoforward crash (#9031)

Crash occurred in singleplayer when leaving a world with
autoforward enabled then re-entering a world.
  • Loading branch information...
paramat committed Oct 9, 2019
1 parent cbcb9e0 commit f483a1a9b2ea85272ce20b9f1ecd24edc29343d1
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/client/game.cpp
@@ -2481,7 +2481,8 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
}

// autoforward if set: simulate "up" key
if (player->getPlayerSettings().continuous_forward && !player->isDead()) {
if (player->getPlayerSettings().continuous_forward &&
client->activeObjectsReceived() && !player->isDead()) {
control.up = true;
keypress_bits |= 1U << 0;
}

0 comments on commit f483a1a

Please sign in to comment.
You can’t perform that action at this time.