- clear the Dehacked string table after passing it to GStrings.

For some reason std::move does not work here so make sure it won't stick around.
This commit is contained in:
Christoph Oelckers 2023-09-15 21:46:53 +02:00
parent d001c3464d
commit 7f7edc4f72
3 changed files with 4 additions and 2 deletions

View file

@ -51,6 +51,7 @@ void FStringTable::LoadStrings (const char *language)
{
int lastlump, lump;
allStrings.Clear();
lastlump = 0;
while ((lump = fileSystem.FindLump("LMACROS", &lastlump)) != -1)
{

View file

@ -87,7 +87,7 @@ public:
void LoadStrings(const char *language);
void UpdateLanguage(const char* language);
StringMap GetDefaultStrings() { return allStrings[default_table]; } // Dehacked needs these for comparison
void SetOverrideStrings(StringMap && map)
void SetOverrideStrings(StringMap & map)
{
allStrings.Insert(override_table, map);
UpdateLanguage(nullptr);

View file

@ -3734,7 +3734,8 @@ void FinishDehPatch ()
OrgSprNames.Reset();
TouchedActors.Reset();
EnglishStrings.Clear();
GStrings.SetOverrideStrings(std::move(DehStrings));
GStrings.SetOverrideStrings(DehStrings);
DehStrings.Clear();
// Now it gets nasty: We have to fiddle around with the weapons' ammo use info to make Doom's original
// ammo consumption work as intended.