Fix isDead()/autoforward crash (#9031)
Crash occurred in singleplayer when leaving a world with autoforward enabled then re-entering a world.master
parent
cbcb9e0b1c
commit
f483a1a9b2
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue