mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 13:36:42 +00:00
Merge pull request #1460 from AnyOldName3/invalid-death-count-cleaning
Check death counts are for valid actors before loading them
This commit is contained in:
commit
a560841705
1 changed files with 3 additions and 2 deletions
|
@ -1768,8 +1768,9 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
std::string id = reader.getHString();
|
std::string id = reader.getHString();
|
||||||
int count;
|
int count;
|
||||||
reader.getHNT (count, "COUN");
|
reader.getHNT(count, "COUN");
|
||||||
mDeathCount[id] = count;
|
if (MWBase::Environment::get().getWorld()->getStore().find(id))
|
||||||
|
mDeathCount[id] = count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue