Merge pull request #1460 from AnyOldName3/invalid-death-count-cleaning

Check death counts are for valid actors before loading them
pull/292/head
scrawl 7 years ago committed by GitHub
commit a560841705

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

Loading…
Cancel
Save