From 9716a61219d7cd26225ccbf18605bd2766a29632 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Sat, 2 Aug 2014 19:32:38 +1200 Subject: [PATCH 1/3] Add CVar for drawing weapons in the althud --- src/g_shared/shared_hud.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g_shared/shared_hud.cpp b/src/g_shared/shared_hud.cpp index 964a28e2b..3806e5f9d 100644 --- a/src/g_shared/shared_hud.cpp +++ b/src/g_shared/shared_hud.cpp @@ -70,6 +70,7 @@ CVAR (Bool, hud_showmonsters, true,CVAR_ARCHIVE); // Show monster stats on HUD CVAR (Bool, hud_showitems, false,CVAR_ARCHIVE); // Show item stats on HUD CVAR (Bool, hud_showstats, false, CVAR_ARCHIVE); // for stamina and accuracy. CVAR (Bool, hud_showscore, false, CVAR_ARCHIVE); // for user maintained score +CVAR (Bool, hud_showweapons, true, CVAR_ARCHIVE); // Show weapons collected CVAR (Int , hud_showtime, 0, CVAR_ARCHIVE); // Show time on HUD CVAR (Int , hud_timecolor, CR_GOLD,CVAR_ARCHIVE); // Color of in-game time on HUD @@ -972,7 +973,7 @@ void DrawHUD() CPlayer->mo->FindInventory(), 5, hudheight-20); i=DrawKeys(CPlayer, hudwidth-4, hudheight-10); i=DrawAmmo(CPlayer, hudwidth-5, i); - DrawWeapons(CPlayer, hudwidth-5, i); + if (hud_showweapons) DrawWeapons(CPlayer, hudwidth - 5, i); DrawInventory(CPlayer, 144, hudheight-28); if (CPlayer->camera && CPlayer->camera->player) { From 6ef67e1d3e078c193245e3d9bc96e1931704d4f6 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 2 Aug 2014 13:14:25 +0300 Subject: [PATCH 2/3] Fixed build on compilers other than MSVC No more "Call to 'LittleShort' is ambiguous" error --- src/p_acs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 16e511b23..2ca6fe909 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -1677,7 +1677,7 @@ void FBehavior::SerializeVarSet (FArchive &arc, SDWORD *vars, int max) static int ParseLocalArrayChunk(void *chunk, ACSLocalArrays *arrays, int offset) { - unsigned count = (LittleShort(((unsigned *)chunk)[1]) - 2) / 4; + unsigned count = (LittleShort(static_cast(((unsigned *)chunk)[1]) - 2)) / 4; int *sizes = (int *)((BYTE *)chunk + 10); arrays->Count = count; if (count > 0) From a1b579e5fccd16b7aaf73d0bb0c8c4018fc11830 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 3 Aug 2014 01:20:12 +0200 Subject: [PATCH 3/3] - added menu entry for newly added hud_showweapons CVAR. --- wadsrc/static/menudef.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 7099e6cc7..324c94e6b 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -816,6 +816,7 @@ OptionMenu "AltHUDOptions" Option "Show item count", "hud_showitems", "OnOff" Option "Show stamina and accuracy", "hud_showstats", "OnOff" Option "Show berserk", "hud_berserk_health", "OnOff" + Option "Show weapons", "hud_showweapons", "OnOff" Option "Show time", "hud_showtime", "AltHUDTime" Option "Time color", "hud_timecolor", "TextColors" Slider "Red ammo display below %", "hud_ammo_red", 0, 100, 1, 0