mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- fixed display of "Find help" text in Strife. Also moved this piece of code to a place where a real player exists. This was set at a point where the map wasn't loaded yet which caused a few problems.
# Conflicts: # src/g_level.cpp # src/p_user.cpp
This commit is contained in:
parent
23a4094080
commit
ff6881cd7c
2 changed files with 12 additions and 12 deletions
|
@ -452,16 +452,6 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
ST_CreateStatusBar(bTitleLevel);
|
||||
setsizeneeded = true;
|
||||
|
||||
if (gameinfo.gametype == GAME_Strife || (SBarInfoScript[SCRIPT_CUSTOM] != NULL && SBarInfoScript[SCRIPT_CUSTOM]->GetGameType() == GAME_Strife))
|
||||
{
|
||||
// Set the initial quest log text for Strife.
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (playeringame[i])
|
||||
players[i].SetLogText ("$TXT_FINDHELP");
|
||||
}
|
||||
}
|
||||
|
||||
// [RH] If this map doesn't exist, bomb out
|
||||
if (!P_CheckMapData(mapname))
|
||||
{
|
||||
|
@ -522,6 +512,16 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
}
|
||||
|
||||
G_DoLoadLevel (0, false, !savegamerestore);
|
||||
|
||||
if (gameinfo.gametype == GAME_Strife || (SBarInfoScript[SCRIPT_CUSTOM] != nullptr && SBarInfoScript[SCRIPT_CUSTOM]->GetGameType() == GAME_Strife))
|
||||
{
|
||||
// Set the initial quest log text for Strife.
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (playeringame[i])
|
||||
players[i].SetLogText("$TXT_FINDHELP");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -448,11 +448,11 @@ void player_t::SetLogText (const char *text)
|
|||
{
|
||||
LogText = text;
|
||||
|
||||
if (mo->CheckLocalView(consoleplayer))
|
||||
if (mo && mo->CheckLocalView(consoleplayer))
|
||||
{
|
||||
// Print log text to console
|
||||
AddToConsole(-1, TEXTCOLOR_GOLD);
|
||||
AddToConsole(-1, GStrings(LogText));
|
||||
AddToConsole(-1, LogText[0] == '$'? GStrings(LogText.GetChars()+1) : LogText.GetChars() );
|
||||
AddToConsole(-1, "\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue