mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fix isDead()/autoforward crash (#9031)
Crash occurred in singleplayer when leaving a world with autoforward enabled then re-entering a world.
This commit is contained in:
parent
cbcb9e0b1c
commit
f483a1a9b2
1 changed files with 2 additions and 1 deletions
|
@ -2481,7 +2481,8 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
|
||||||
}
|
}
|
||||||
|
|
||||||
// autoforward if set: simulate "up" key
|
// 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;
|
control.up = true;
|
||||||
keypress_bits |= 1U << 0;
|
keypress_bits |= 1U << 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue