Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/coelckers/gzdoom
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 25, 2020
2 parents dbb1819 + 7d5df1d commit 730f64e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/gamedata/gi.cpp
Expand Up @@ -440,6 +440,7 @@ void FMapInfoParser::ParseGameInfo()
GAMEINFOKEY_STRING(statusscreen_dm, "statscreen_dm")
GAMEINFOKEY_TWODOUBLES(normforwardmove, "normforwardmove")
GAMEINFOKEY_TWODOUBLES(normsidemove, "normsidemove")
GAMEINFOKEY_BOOL(nomergepickupmsg, "nomergepickupmsg")

else
{
Expand Down
1 change: 1 addition & 0 deletions src/gamedata/gi.h
Expand Up @@ -206,6 +206,7 @@ struct gameinfo_t
double normforwardmove[2];
double normsidemove[2];
int fullscreenautoaspect = 0;
bool nomergepickupmsg;

const char *GetFinalePage(unsigned int num) const;
};
Expand Down
4 changes: 3 additions & 1 deletion src/playsim/a_pickups.cpp
Expand Up @@ -41,6 +41,7 @@
#include "d_player.h"
#include "vm.h"
#include "g_levellocals.h"
#include "gi.h"

EXTERN_CVAR(Bool, sv_unlimited_pickup)

Expand All @@ -55,7 +56,8 @@ static FString StaticLastMessage;

void PrintPickupMessage(bool localview, const FString &str)
{
if (str.IsNotEmpty() && localview && (StaticLastMessageTic != gametic || StaticLastMessage.Compare(str)))
// [MK] merge identical messages on same tic unless disabled in gameinfo
if (str.IsNotEmpty() && localview && (gameinfo.nomergepickupmsg || StaticLastMessageTic != gametic || StaticLastMessage.Compare(str)))
{
StaticLastMessageTic = gametic;
StaticLastMessage = str;
Expand Down

0 comments on commit 730f64e

Please sign in to comment.