mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-16 17:21:10 +00:00
- 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:
parent
d001c3464d
commit
7f7edc4f72
3 changed files with 4 additions and 2 deletions
|
@ -51,6 +51,7 @@ void FStringTable::LoadStrings (const char *language)
|
|||
{
|
||||
int lastlump, lump;
|
||||
|
||||
allStrings.Clear();
|
||||
lastlump = 0;
|
||||
while ((lump = fileSystem.FindLump("LMACROS", &lastlump)) != -1)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue