aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2019-10-09 19:39:50 +0100
committerGitHub <noreply@github.com>2019-10-09 19:39:50 +0100
commitf483a1a9b2ea85272ce20b9f1ecd24edc29343d1 (patch)
tree7f32f97dd55cf61c947e8288d3ec9851c05c241d
parentcbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f (diff)
downloadminetest-f483a1a9b2ea85272ce20b9f1ecd24edc29343d1.tar.gz
minetest-f483a1a9b2ea85272ce20b9f1ecd24edc29343d1.tar.bz2
minetest-f483a1a9b2ea85272ce20b9f1ecd24edc29343d1.zip
Fix isDead()/autoforward crash (#9031)
Crash occurred in singleplayer when leaving a world with autoforward enabled then re-entering a world.
-rw-r--r--src/client/game.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 028d2d3bd..450eb4e32 100644
--- a/src/client/game.cpp
+++ b/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;
}