Prevent early respawns caused by up/down button in the death screen (#13870)

This commit is contained in:
Muhammad Rifqi Priyo Susanto 2023-10-09 22:13:33 +07:00 committed by GitHub
parent b270c2bd68
commit 7e678b5686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -177,8 +177,11 @@ struct LocalFormspecHandler : public TextDest
} }
if (m_formname == "MT_DEATH_SCREEN") { if (m_formname == "MT_DEATH_SCREEN") {
assert(m_client != 0); assert(m_client != nullptr);
m_client->sendRespawn();
if (fields.find("quit") != fields.end())
m_client->sendRespawn();
return; return;
} }