1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
This commit is contained in:
Lars Müller 2025-06-22 21:03:32 -04:00 committed by GitHub
commit 8798463917
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1917,7 +1917,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();