1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Do not soul trap creatures without a soul (which apparently exist)

This commit is contained in:
scrawl 2014-01-17 18:43:45 +01:00
parent 149d77dedf
commit 3dcb292bc1

View File

@ -131,6 +131,8 @@ namespace MWMechanics
static const float fSoulgemMult = world->getStore().get<ESM::GameSetting>().find("fSoulgemMult")->getFloat();
float creatureSoulValue = mCreature.get<ESM::Creature>()->mBase->mData.mSoul;
if (creatureSoulValue == 0)
return;
// Use the smallest soulgem that is large enough to hold the soul
MWWorld::ContainerStore& container = caster.getClass().getContainerStore(caster);