# HG changeset patch # User Adam Kaminski # Date 1636301389 18000 # Sun Nov 07 11:09:49 2021 -0500 # Node ID 220bdfa8def3f7d2a3e5e96e2253483642f75696 # Parent 53ddc68c073ed1d0c127f42c92bd1d97f899dc4a Fixed the bottom-centered waiting message fading out too early in rare cases. diff -r 53ddc68c073e -r 220bdfa8def3 src/g_shared/st_hud.cpp --- a/src/g_shared/st_hud.cpp Sun Nov 07 08:10:07 2021 -0500 +++ b/src/g_shared/st_hud.cpp Sun Nov 07 11:09:49 2021 -0500 @@ -445,6 +445,8 @@ // static void HUD_DrawBottomString( ULONG ulDisplayPlayer ) { + static bool bAlreadyFadingOut = true; + static FString oldBottomString; FString bottomString; // [BB] Draw a message to show that the free spectate mode is active. @@ -561,8 +563,20 @@ // [RC] Draw the centered bottom message (spectating, following, waiting, etc). if ( bottomString.Len( ) > 0 ) { - DHUDMessageFadeOut *pMsg = new DHUDMessageFadeOut( SmallFont, bottomString, 1.5f, 1.0f, 0, 0, CR_WHITE, 0.10f, 0.15f ); + DHUDMessage *pMsg = new DHUDMessage( SmallFont, bottomString, 1.5f, 1.0f, 0, 0, CR_WHITE, 0.0f ); StatusBar->AttachMessage( pMsg, MAKE_ID( 'W', 'A', 'I', 'T' )); + oldBottomString = bottomString; + + // [AK] Fade out the message if the bottom string becomes empty later. + bAlreadyFadingOut = false; + } + else if ( bAlreadyFadingOut == false ) + { + DHUDMessageFadeOut *pMsg = new DHUDMessageFadeOut( SmallFont, oldBottomString, 1.5f, 1.0f, 0, 0, CR_WHITE, 0.10f, 0.15f ); + StatusBar->AttachMessage( pMsg, MAKE_ID( 'W', 'A', 'I', 'T' )); + + // [AK] Don't fade out the message again until it reappears. + bAlreadyFadingOut = true; } }