diff --git a/src/g_game.c b/src/g_game.c index b6eed5752..1118f0ae6 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1388,8 +1388,8 @@ static void G_DoLoadLevel(void) // Rewind G_SetRewindCountdown(0); - // Clear messages - ST_ClearMessages(); + // Hide messages (but don't delete them outright) + ST_HideMessages(); // Minimap if (minimap_was_on) { diff --git a/src/st_widgets.c b/src/st_widgets.c index 34bc48e85..edec13c46 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -279,6 +279,19 @@ void ST_ClearMessages(void) message_index = 0; } +void ST_HideMessages(void) +{ + linkedmessage_t *m = message_list_head; + + while (m) + { + m->duration_left = 0; + m = m->next; + } + + players[consoleplayer].secretmessage = ""; // Clear secret message too +} + // [Nugget] -----------------------------------------------------------------/ static void UpdateMessage(sbe_widget_t *widget, player_t *player) diff --git a/src/st_widgets.h b/src/st_widgets.h index 2196f52d9..2f8849d2a 100644 --- a/src/st_widgets.h +++ b/src/st_widgets.h @@ -26,6 +26,7 @@ extern boolean sp_chat; boolean ST_GetChatOn(void); int ST_GetNumMessageLines(void); void ST_ClearMessages(void); +void ST_HideMessages(void); // [Nugget] =================================================================/