mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 12:10:53 +00:00
- fixed: hud_messages completely blocked the messages, even from going to the console.
It should only block the on-screen notification display, which the backend already implements. The game code should not check this CVAR again.
This commit is contained in:
parent
41a1120033
commit
91b31cec39
5 changed files with 14 additions and 34 deletions
|
@ -229,10 +229,7 @@ CVARD(Bool, hud_showmapname, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disab
|
||||||
CVARD(Bool, hud_position, false, CVAR_ARCHIVE, "aligns the status bar to the bottom/top")
|
CVARD(Bool, hud_position, false, CVAR_ARCHIVE, "aligns the status bar to the bottom/top")
|
||||||
CVARD(Bool, hud_bgstretch, false, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable background image stretching in wide resolutions")
|
CVARD(Bool, hud_bgstretch, false, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "enable/disable background image stretching in wide resolutions")
|
||||||
CVARD(Int, hud_messagetime, 120, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "length of time to display multiplayer chat messages")
|
CVARD(Int, hud_messagetime, 120, CVAR_ARCHIVE|CVAR_FRONTEND_DUKELIKE, "length of time to display multiplayer chat messages")
|
||||||
CUSTOM_CVARD(Int, hud_messages, 1, CVAR_ARCHIVE, "enable/disable showing messages")
|
CVARD(Bool, hud_messages, 1, CVAR_ARCHIVE, "enable/disable showing messages")
|
||||||
{
|
|
||||||
if (self < 0 || self > 2) self = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This cannot be done with the 'toggle' CCMD because it needs to control itself when to output the message
|
// This cannot be done with the 'toggle' CCMD because it needs to control itself when to output the message
|
||||||
CCMD (togglemessages)
|
CCMD (togglemessages)
|
||||||
|
|
|
@ -63,7 +63,7 @@ EXTERN_CVAR(Int, hud_messagetime)
|
||||||
EXTERN_CVAR(Bool, hud_glowingquotes)
|
EXTERN_CVAR(Bool, hud_glowingquotes)
|
||||||
EXTERN_CVAR(Int, hud_textscale)
|
EXTERN_CVAR(Int, hud_textscale)
|
||||||
EXTERN_CVAR(Int, hud_weaponscale)
|
EXTERN_CVAR(Int, hud_weaponscale)
|
||||||
EXTERN_CVAR(Int, hud_messages)
|
EXTERN_CVAR(Bool, hud_messages)
|
||||||
|
|
||||||
EXTERN_CVAR(Int, althud_numbertile)
|
EXTERN_CVAR(Int, althud_numbertile)
|
||||||
EXTERN_CVAR(Int, althud_numberpal)
|
EXTERN_CVAR(Int, althud_numberpal)
|
||||||
|
|
|
@ -139,14 +139,14 @@ void GameInterface::ExitFromMenu()
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// This now redirects the messagew to the console's notification display
|
// This now redirects the messages to the console's notification display
|
||||||
// which has all the features to reasonably do this in Duke style.
|
// which has all the features to reasonably do this in Duke style.
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void FTA(int q, struct player_struct* p)
|
void FTA(int q, struct player_struct* p)
|
||||||
{
|
{
|
||||||
if (hud_messages == 0 || q < 0 || !(p->gm & MODE_GAME))
|
if (q < 0 || !(p->gm & MODE_GAME))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (p->ftq != q || (totalclock - p->ftt > TICRATE && q != QUOTE_DEAD))
|
if (p->ftq != q || (totalclock - p->ftt > TICRATE && q != QUOTE_DEAD))
|
||||||
|
@ -156,7 +156,7 @@ void FTA(int q, struct player_struct* p)
|
||||||
if (p == &ps[screenpeek] && qu[0] != '\0')
|
if (p == &ps[screenpeek] && qu[0] != '\0')
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
if (q >= 70 && q <= 72 && hud_messages == 2)
|
if (q >= 70 && q <= 72)
|
||||||
{
|
{
|
||||||
// Todo: redirect this to a centered message (these are "need a key" messages)
|
// Todo: redirect this to a centered message (these are "need a key" messages)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5720,15 +5720,18 @@ KeyMain:
|
||||||
PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health
|
PlayerUpdateHealth(pp, InventoryDecls[InvDecl_Booster].amount); // This is for health
|
||||||
// over 100%
|
// over 100%
|
||||||
// Say something witty
|
// Say something witty
|
||||||
if (pp == Player+myconnectindex && hud_messages)
|
if (pp == Player+myconnectindex)
|
||||||
{
|
{
|
||||||
int cookie = (adult_lockout)? STD_RANDOM_RANGE(10) : STD_RANDOM_RANGE(MAX_FORTUNES);
|
int cookie = (adult_lockout)? STD_RANDOM_RANGE(10) : STD_RANDOM_RANGE(MAX_FORTUNES);
|
||||||
// print to the console, and the user quote display.
|
// print to the console, and the user quote display.
|
||||||
FStringf msg("%s %s", GStrings("TXTS_FORTUNE"), quoteMgr.GetQuote(QUOTE_COOKIE + cookie));
|
FStringf msg("%s %s", GStrings("TXTS_FORTUNE"), quoteMgr.GetQuote(QUOTE_COOKIE + cookie));
|
||||||
Printf(TEXTCOLOR_SAPPHIRE "%s\n", msg.GetChars());
|
Printf(PRINT_NONOTIFY, TEXTCOLOR_SAPPHIRE "%s\n", msg.GetChars());
|
||||||
strncpy(pp->cookieQuote, msg, 255);
|
if (hud_messages)
|
||||||
pp->cookieQuote[255] = 0;
|
{
|
||||||
pp->cookieTime = 540;
|
strncpy(pp->cookieQuote, msg, 255);
|
||||||
|
pp->cookieQuote[255] = 0;
|
||||||
|
pp->cookieTime = 540;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
|
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
|
||||||
|
|
|
@ -167,28 +167,8 @@ void MNU_DrawSmallString(int x, int y, const char* string, int shade, int pal, i
|
||||||
|
|
||||||
void PutStringInfo(PLAYERp pp, const char *string)
|
void PutStringInfo(PLAYERp pp, const char *string)
|
||||||
{
|
{
|
||||||
if (pp-Player == myconnectindex && hud_messages)
|
if (pp-Player == myconnectindex)
|
||||||
Printf(PRINT_MEDIUM|PRINT_NOTIFY, "%s\n", string); // Put it in the console too
|
Printf(PRINT_MEDIUM|PRINT_NOTIFY, "%s\n", string); // Put it in the console too
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0 // kept as a reminder to reimplement a 'native' looking display option in the backend
|
|
||||||
void PutStringInfoLine(PLAYERp pp, const char *string)
|
|
||||||
{
|
|
||||||
short GlobInfoStringTime = TEXT_INFO_TIME;
|
|
||||||
|
|
||||||
short x,y;
|
|
||||||
short w,h;
|
|
||||||
|
|
||||||
if (pp-Player != myconnectindex)
|
|
||||||
return;
|
|
||||||
|
|
||||||
x = 160;
|
|
||||||
y = TEXT_INFO_LINE(0);
|
|
||||||
|
|
||||||
PutStringTimer(pp, x, y, string, GlobInfoStringTime);
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
END_SW_NS
|
END_SW_NS
|
||||||
|
|
Loading…
Reference in a new issue