1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 16:49:54 +00:00

Check death counts are for valid actors before loading them

This commit is contained in:
AnyOldName3 2017-09-17 14:09:29 +01:00
parent f24b807edc
commit 5a5cb1a160

View file

@ -1767,9 +1767,12 @@ namespace MWMechanics
while (reader.isNextSub("ID__"))
{
std::string id = reader.getHString();
int count;
reader.getHNT (count, "COUN");
mDeathCount[id] = count;
if (MWBase::Environment::get().getWorld()->getStore().find(id))
{
int count;
reader.getHNT(count, "COUN");
mDeathCount[id] = count;
}
}
}
}