From 7e678b5686d5632a8ec958e34fedc1ae3cdfa049 Mon Sep 17 00:00:00 2001 From: Muhammad Rifqi Priyo Susanto Date: Mon, 9 Oct 2023 22:13:33 +0700 Subject: [PATCH] Prevent early respawns caused by up/down button in the death screen (#13870) --- src/client/game.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index 55f678004..27b314559 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -177,8 +177,11 @@ struct LocalFormspecHandler : public TextDest } if (m_formname == "MT_DEATH_SCREEN") { - assert(m_client != 0); - m_client->sendRespawn(); + assert(m_client != nullptr); + + if (fields.find("quit") != fields.end()) + m_client->sendRespawn(); + return; }