mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +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.
This commit is contained in:
parent
ce22f1db51
commit
c0e4ef159b
2 changed files with 12 additions and 12 deletions
|
@ -484,16 +484,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))
|
||||
{
|
||||
|
@ -552,6 +542,16 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
}
|
||||
|
||||
G_DoLoadLevel (mapname, 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -400,11 +400,11 @@ void player_t::SetLogText (const char *text)
|
|||
{
|
||||
LogText = text;
|
||||
|
||||
if (mo->CheckLocalView())
|
||||
if (mo && mo->CheckLocalView())
|
||||
{
|
||||
// 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