Merge branch 'master' into new_level_refactor

# Conflicts:
#	src/p_user.cpp
This commit is contained in:
Christoph Oelckers 2019-02-02 16:58:30 +01:00
commit 1dbbb56a1b
10 changed files with 14 additions and 8 deletions

View file

@ -490,7 +490,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
for (i = 0; i < MAXPLAYERS; ++i) for (i = 0; i < MAXPLAYERS; ++i)
{ {
if (playeringame[i]) if (playeringame[i])
players[i].SetLogText ("Find help"); players[i].SetLogText ("$TXT_FINDHELP");
} }
} }

View file

@ -923,7 +923,7 @@ class CommandDrawString : public SBarInfoCommand
break; break;
} }
case LOGTEXT: case LOGTEXT:
str = statusBar->CPlayer->LogText; str = GStrings(statusBar->CPlayer->LogText);
break; break;
default: default:
break; break;

View file

@ -55,6 +55,7 @@
#include "vm.h" #include "vm.h"
#include "p_acs.h" #include "p_acs.h"
#include "sbarinfo.h" #include "sbarinfo.h"
#include "gstrings.h"
#include "events.h" #include "events.h"
#include "g_game.h" #include "g_game.h"
@ -1046,7 +1047,7 @@ void DBaseStatusBar::DrawLog ()
hudheight = SCREENHEIGHT / scale; hudheight = SCREENHEIGHT / scale;
int linelen = hudwidth<640? Scale(hudwidth,9,10)-40 : 560; int linelen = hudwidth<640? Scale(hudwidth,9,10)-40 : 560;
auto lines = V_BreakLines (SmallFont, linelen, CPlayer->LogText); auto lines = V_BreakLines (SmallFont, linelen, GStrings(CPlayer->LogText));
int height = 20; int height = 20;
for (unsigned i = 0; i < lines.Size(); i++) height += SmallFont->GetHeight () + 1; for (unsigned i = 0; i < lines.Size(); i++) height += SmallFont->GetHeight () + 1;

View file

@ -555,7 +555,7 @@ int P_GetMapColorForKey (AActor * key)
foundlock = pair->Key; foundlock = pair->Key;
} }
} }
return 0; return rgb;
} }

View file

@ -91,6 +91,7 @@
#include "events.h" #include "events.h"
#include "g_game.h" #include "g_game.h"
#include "v_video.h" #include "v_video.h"
#include "gstrings.h"
static FRandom pr_skullpop ("SkullPop"); static FRandom pr_skullpop ("SkullPop");
@ -403,7 +404,7 @@ void player_t::SetLogText (const char *text)
{ {
// Print log text to console // Print log text to console
AddToConsole(-1, TEXTCOLOR_GOLD); AddToConsole(-1, TEXTCOLOR_GOLD);
AddToConsole(-1, LogText); AddToConsole(-1, GStrings(LogText));
AddToConsole(-1, "\n"); AddToConsole(-1, "\n");
} }
} }

View file

@ -1464,6 +1464,8 @@ TXT_DOES_NOT_WORK = "That doesn't seem to work";
// Strife Quest messages // Strife Quest messages
TXT_FINDHELP = "FIND HELP";
TXT_QUEST_14 = "You've Blown Up the Crystal"; TXT_QUEST_14 = "You've Blown Up the Crystal";
TXT_QUEST_16 = "You've Blown Up the Gates"; TXT_QUEST_16 = "You've Blown Up the Gates";
TXT_QUEST_27 = "You've Blown Up the Computer"; TXT_QUEST_27 = "You've Blown Up the Computer";

View file

@ -336,7 +336,7 @@ extend class Actor
while (last.inv != NULL) while (last.inv != NULL)
{ {
let inv = last.inv; let inv = last.inv;
if (!inv.bUndroppable) if (!inv.bUndroppable && !inv.bUnclearable)
{ {
inv.DepleteOrDestroy(); inv.DepleteOrDestroy();
if (!inv.bDestroyed) last = inv; // was only depleted so advance the pointer manually. if (!inv.bDestroyed) last = inv; // was only depleted so advance the pointer manually.

View file

@ -64,6 +64,7 @@ class Inventory : Actor
flagdef IsArmor: ItemFlags, 21; flagdef IsArmor: ItemFlags, 21;
flagdef IsHealth: ItemFlags, 22; flagdef IsHealth: ItemFlags, 22;
flagdef AlwaysPickup: ItemFlags, 23; flagdef AlwaysPickup: ItemFlags, 23;
flagdef Unclearable: ItemFlags, 24;
flagdef ForceRespawnInSurvival: none, 0; flagdef ForceRespawnInSurvival: none, 0;
flagdef PickupFlash: none, 6; flagdef PickupFlash: none, 6;

View file

@ -2028,7 +2028,7 @@ class PlayerPawn : Actor
if (item.bINVBAR && item.Amount > item.InterHubAmount) if (item.bINVBAR && item.Amount > item.InterHubAmount)
{ {
item.Amount = item.InterHubAmount; item.Amount = item.InterHubAmount;
if (level.REMOVEITEMS && !item.bUNDROPPABLE) if (level.REMOVEITEMS && !item.bUNDROPPABLE && !item.bUNCLEARABLE)
{ {
todelete.Push(item); todelete.Push(item);
} }

View file

@ -432,7 +432,8 @@ class StrifeStatusBar : BaseStatusBar
if (CPlayer.LogText.Length() > 0) if (CPlayer.LogText.Length() > 0)
{ {
BrokenLines lines = SmallFont2.BreakLines(CPlayer.LogText, 272); let text = Stringtable.Localize(CPlayer.LogText);
BrokenLines lines = SmallFont2.BreakLines(text, 272);
for (i = 0; i < lines.Count(); ++i) for (i = 0; i < lines.Count(); ++i)
{ {
screen.DrawText(SmallFont2, Font.CR_UNTRANSLATED, left + 24 * xscale, top + (18 + i * 12)*yscale, screen.DrawText(SmallFont2, Font.CR_UNTRANSLATED, left + 24 * xscale, top + (18 + i * 12)*yscale,