Do not necessary reload enhancement file
This commit is contained in:
parent
998ff9ea2a
commit
155d331d45
|
@ -235,8 +235,11 @@ void CEnhancements::LoadEnhancements(const char * Ident, SectionFiles & Files, s
|
||||||
{
|
{
|
||||||
CPath CheatFile(CheatFileItr->second);
|
CPath CheatFile(CheatFileItr->second);
|
||||||
if (CheatFile.Exists())
|
if (CheatFile.Exists())
|
||||||
|
{
|
||||||
|
if (File.get() == nullptr || strcmp(File->FileName(), CheatFile) != 0)
|
||||||
{
|
{
|
||||||
File = std::make_unique<CEnhancmentFile>(CheatFile, Ident);
|
File = std::make_unique<CEnhancmentFile>(CheatFile, Ident);
|
||||||
|
}
|
||||||
File->GetEnhancementList(SectionIdent.c_str(), EnhancementList);
|
File->GetEnhancementList(SectionIdent.c_str(), EnhancementList);
|
||||||
FoundFile = true;
|
FoundFile = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue