diff --git a/source/common/utility/i_time.cpp b/source/common/utility/i_time.cpp index 5f4e23802..9a742dbba 100644 --- a/source/common/utility/i_time.cpp +++ b/source/common/utility/i_time.cpp @@ -46,7 +46,7 @@ static uint64_t FirstFrameStartTime; static uint64_t CurrentFrameStartTime; static uint64_t FreezeTime; -int GameTicRate; +int GameTicRate = 35; // make sure it is not 0, even if the client doesn't set it. double TimeScale = 1.0; diff --git a/source/core/console/c_console.cpp b/source/core/console/c_console.cpp index 656028f8c..4aa3f9b5c 100644 --- a/source/core/console/c_console.cpp +++ b/source/core/console/c_console.cpp @@ -154,7 +154,7 @@ CVAR(Int, developer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) EXTERN_CVAR(Int, uiscale); -bool generic_ui = true; +CVAR(Bool, generic_ui, false, CVAR_ARCHIVE) struct History @@ -785,7 +785,7 @@ void FNotifyBuffer::AddString(int printlevel, FString source) width = screen->GetWidth() / active_con_scaletext(twod, generic_ui); - FFont *font = generic_ui ? NewSmallFont : AlternativeSmallFont; + FFont* font = generic_ui ? NewSmallFont : SmallFont ? SmallFont : AlternativeSmallFont; if (font == nullptr) return; // Without an initialized font we cannot handle the message (this is for those which come here before the font system is ready.) if (AddType == APPENDLINE && Text.Size() > 0 && Text[Text.Size() - 1].PrintLevel == printlevel) @@ -905,7 +905,7 @@ int PrintString (int iprintlevel, const char *outline) I_PrintStr(outline); conbuffer->AddText(printlevel, outline); - if (vidactive && (iprintlevel & PRINT_NOTIFY)) + if (vidactive && (iprintlevel & PRINT_NOTIFY)) // The logic here is inverse to ZDoom because most texts getting here should not be on screem. { NotifyStrings.AddString(printlevel, outline); } @@ -1065,7 +1065,7 @@ void FNotifyBuffer::Tick() if (i > 0) { Text.Delete(0, i); - FFont* font = generic_ui ? NewSmallFont : AlternativeSmallFont; + FFont* font = generic_ui ? NewSmallFont : SmallFont ? SmallFont : AlternativeSmallFont; Top += font->GetHeight(); } } @@ -1079,7 +1079,7 @@ void FNotifyBuffer::Draw() //if (gamestate == GS_FULLCONSOLE || gamestate == GS_DEMOSCREEN/* || menuactive != MENU_Off*/) //return; - FFont* font = generic_ui ? NewSmallFont : AlternativeSmallFont; + FFont* font = generic_ui ? NewSmallFont : SmallFont? SmallFont : AlternativeSmallFont; line = Top + font->GetDisplacement(); canskip = true; diff --git a/source/games/duke/src/game.h b/source/games/duke/src/game.h index 2797697f6..71475aa32 100644 --- a/source/games/duke/src/game.h +++ b/source/games/duke/src/game.h @@ -230,7 +230,6 @@ void spriteglass(int spriteNum,int glassCnt); void lotsofcolourglass(int spriteNum,int wallNum,int glassCnt); void lotsofglass(int spriteNum,int wallnum,int glassCnt); -void G_AddUserQuote(const char *daquote); void G_BackToMenu(void); void G_DumpDebugInfo(void); diff --git a/source/games/duke/src/zz_game.cpp b/source/games/duke/src/zz_game.cpp index 795253736..f977b1208 100644 --- a/source/games/duke/src/zz_game.cpp +++ b/source/games/duke/src/zz_game.cpp @@ -1951,8 +1951,6 @@ MAIN_LOOP_RESTART: lockclock = 0; g_player[myconnectindex].ps->fta = 0; - for (int & q : user_quote_time) - q = 0; if (ud.warp_on == 1) { @@ -2152,16 +2150,6 @@ int G_DoMoveThings(void) if (g_RTSPlaying > 0) g_RTSPlaying--; - for (int & i : user_quote_time) - { - if (i) - { - if (--i > hud_messagetime) - i = hud_messagetime; - if (!i) pub = NUMPAGES; - } - } - // Name display when aiming at opponents if (cl_idplayers && (g_netServer || ud.multimode > 1) ) diff --git a/source/games/duke/src/zz_text.cpp b/source/games/duke/src/zz_text.cpp index 48ae4fbf6..b2b2eadb6 100644 --- a/source/games/duke/src/zz_text.cpp +++ b/source/games/duke/src/zz_text.cpp @@ -320,7 +320,10 @@ void P_DoQuote(int32_t q, DukePlayer_t *p) { auto qu = quoteMgr.GetQuote(q); if (p == g_player[screenpeek].ps && qu[0] != '\0') - Printf((cq ? PRINT_LOW : PRINT_MEDIUM) | PRINT_NOTIFY, "%s\n", qu); + { + int printlevel = hud_messages == 1 ? PRINT_MEDIUM : PRINT_MEDIUM | PRINT_NOTIFY; + Printf(printlevel, "%s\n", qu); + } } @@ -344,8 +347,11 @@ void GameInterface::DoPrintMessage(int prio, const char* t) if (p->fta > 0) if (p->ftq == QUOTE_RESERVED || p->ftq == QUOTE_RESERVED2) return; - if (p == g_player[screenpeek].ps) - Printf(prio|PRINT_NOTIFY, cq ? TEXTCOLOR_TAN "%s\n" : "%s\n", t); + if (p == g_player[screenpeek].ps) + { + if (hud_messages == 2) prio |= PRINT_NOTIFY; + Printf(prio, cq ? TEXTCOLOR_TAN "%s\n" : "%s\n", t); + } if (hud_messages == 1) {