1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00
This commit is contained in:
Lars Müller 2025-09-22 14:28:48 -07:00 committed by GitHub
commit 33dba73d2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1890,7 +1890,9 @@ void Game::processUserInput(f32 dtime)
void Game::processKeyInput()
{
if (wasKeyDown(KeyType::DROP)) {
const auto *player = client->getEnv().getLocalPlayer();
const bool dead = player->getCAO() && player->isDead();
if (wasKeyDown(KeyType::DROP) && !dead) {
dropSelectedItem(isKeyDown(KeyType::SNEAK));
} else if (wasKeyDown(KeyType::AUTOFORWARD)) {
toggleAutoforward();