1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Support /-separated big effect icon paths

This commit is contained in:
Alexei Kotov 2023-02-10 18:34:20 +03:00
parent b385f27f86
commit 7b62d47abc
2 changed files with 2 additions and 0 deletions

View File

@ -416,6 +416,7 @@ namespace MWGui
spell->mEffects.mList.front().mEffectID);
std::string icon = effect->mIcon;
std::replace(icon.begin(), icon.end(), '/', '\\');
int slashPos = icon.rfind('\\');
icon.insert(slashPos + 1, "b_");
icon = Misc::ResourceHelpers::correctIconPath(icon, MWBase::Environment::get().getResourceSystem()->getVFS());

View File

@ -302,6 +302,7 @@ namespace MWGui
const ESM::MagicEffect* effect = esmStore.get<ESM::MagicEffect>().find(spell->mEffects.mList.front().mEffectID);
std::string path = effect->mIcon;
std::replace(path.begin(), path.end(), '/', '\\');
int slashPos = path.rfind('\\');
path.insert(slashPos + 1, "b_");
path = Misc::ResourceHelpers::correctIconPath(path, MWBase::Environment::get().getResourceSystem()->getVFS());