fix: clarify death dialog — auto-release label and resurrection hint

'Release in X:XX' implied a client-enforced forced release; renamed to
'Auto-release in X:XX' (server-driven) and added 'Or wait for a player
to resurrect you.' hint so players know they can stay dead without
clicking Release Spirit.
This commit is contained in:
Kelsi 2026-03-18 05:39:42 -07:00
parent 90843ea989
commit fabcde42a5

View file

@ -16588,8 +16588,8 @@ void GameScreen::renderDeathScreen(game::GameHandler& gameHandler) {
// "Release Spirit" dialog centered on screen // "Release Spirit" dialog centered on screen
const bool hasSelfRes = gameHandler.canSelfRes(); const bool hasSelfRes = gameHandler.canSelfRes();
float dlgW = 280.0f; float dlgW = 280.0f;
// Extra height when self-res button is available // Extra height when self-res button is available; +20 for the "wait for res" hint
float dlgH = hasSelfRes ? 170.0f : 130.0f; float dlgH = hasSelfRes ? 190.0f : 150.0f;
ImGui::SetNextWindowPos(ImVec2(screenW / 2 - dlgW / 2, screenH * 0.35f), ImGuiCond_Always); ImGui::SetNextWindowPos(ImVec2(screenW / 2 - dlgW / 2, screenH * 0.35f), ImGuiCond_Always);
ImGui::SetNextWindowSize(ImVec2(dlgW, dlgH), ImGuiCond_Always); ImGui::SetNextWindowSize(ImVec2(dlgW, dlgH), ImGuiCond_Always);
@ -16608,13 +16608,13 @@ void GameScreen::renderDeathScreen(game::GameHandler& gameHandler) {
ImGui::SetCursorPosX((dlgW - textW) / 2); ImGui::SetCursorPosX((dlgW - textW) / 2);
ImGui::TextColored(ImVec4(1.0f, 0.2f, 0.2f, 1.0f), "%s", deathText); ImGui::TextColored(ImVec4(1.0f, 0.2f, 0.2f, 1.0f), "%s", deathText);
// Respawn timer: show how long until forced release // Respawn timer: show how long until the server auto-releases the spirit
float timeLeft = kForcedReleaseSec - deathElapsed_; float timeLeft = kForcedReleaseSec - deathElapsed_;
if (timeLeft > 0.0f) { if (timeLeft > 0.0f) {
int mins = static_cast<int>(timeLeft) / 60; int mins = static_cast<int>(timeLeft) / 60;
int secs = static_cast<int>(timeLeft) % 60; int secs = static_cast<int>(timeLeft) % 60;
char timerBuf[48]; char timerBuf[48];
snprintf(timerBuf, sizeof(timerBuf), "Release in %d:%02d", mins, secs); snprintf(timerBuf, sizeof(timerBuf), "Auto-release in %d:%02d", mins, secs);
float tw = ImGui::CalcTextSize(timerBuf).x; float tw = ImGui::CalcTextSize(timerBuf).x;
ImGui::SetCursorPosX((dlgW - tw) / 2); ImGui::SetCursorPosX((dlgW - tw) / 2);
ImGui::TextColored(ImVec4(0.65f, 0.65f, 0.65f, 1.0f), "%s", timerBuf); ImGui::TextColored(ImVec4(0.65f, 0.65f, 0.65f, 1.0f), "%s", timerBuf);
@ -16645,6 +16645,12 @@ void GameScreen::renderDeathScreen(game::GameHandler& gameHandler) {
gameHandler.releaseSpirit(); gameHandler.releaseSpirit();
} }
ImGui::PopStyleColor(2); ImGui::PopStyleColor(2);
// Hint: player can stay dead and wait for another player to cast Resurrection
const char* resHint = "Or wait for a player to resurrect you.";
float hw = ImGui::CalcTextSize(resHint).x;
ImGui::SetCursorPosX((dlgW - hw) / 2);
ImGui::TextColored(ImVec4(0.5f, 0.6f, 0.5f, 0.85f), "%s", resHint);
} }
ImGui::End(); ImGui::End();
ImGui::PopStyleColor(2); ImGui::PopStyleColor(2);