1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Merge remote-tracking branch 'origin/master' into createfix

This commit is contained in:
Marc Zinnschlag 2016-03-01 11:35:28 +01:00
commit c1f4448547
3 changed files with 4 additions and 2 deletions

View file

@ -22,7 +22,7 @@ namespace MWMechanics
mKnockdown(false), mKnockdownOneFrame(false), mKnockdownOverOneFrame(false),
mHitRecovery(false), mBlock(false), mMovementFlags(0),
mFallHeight(0), mRecalcMagicka(false), mLastRestock(0,0), mGoldPool(0), mActorId(-1),
mDeathAnimation(0), mLevel (0)
mDeathAnimation(0), mTimeOfDeath(), mLevel (0)
{
for (int i=0; i<4; ++i)
mAiSettings[i] = 0;

View file

@ -893,7 +893,7 @@ namespace MWWorld
{
const MWMechanics::CreatureStats& creatureStats = ptr.getClass().getCreatureStats(ptr);
static const float fCorpseClearDelay = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("fCorpseClearDelay")->getFloat();
if (!ptr.getClass().isPersistent(ptr) && creatureStats.getTimeOfDeath() + fCorpseClearDelay <= MWBase::Environment::get().getWorld()->getTimeStamp())
if (creatureStats.isDead() && !ptr.getClass().isPersistent(ptr) && creatureStats.getTimeOfDeath() + fCorpseClearDelay <= MWBase::Environment::get().getWorld()->getTimeStamp())
MWBase::Environment::get().getWorld()->deleteObject(ptr);
}

View file

@ -87,6 +87,8 @@ void ESM::CreatureStats::load (ESMReader &esm)
mDeathAnimation = 0;
esm.getHNOT (mDeathAnimation, "DANM");
mTimeOfDeath.mDay = 0;
mTimeOfDeath.mHour = 0;
esm.getHNOT (mTimeOfDeath, "DTIM");
mSpells.load(esm);