diff --git a/apps/openmw/mwmechanics/creaturestats.cpp b/apps/openmw/mwmechanics/creaturestats.cpp index c61cc9697..ac35fc2ea 100644 --- a/apps/openmw/mwmechanics/creaturestats.cpp +++ b/apps/openmw/mwmechanics/creaturestats.cpp @@ -495,7 +495,10 @@ namespace MWMechanics state.mDead = mDead; state.mDied = mDied; state.mMurdered = mMurdered; - state.mFriendlyHits = mFriendlyHits; + // The vanilla engine does not store friendly hits in the save file. Since there's no other mechanism + // that ever resets the friendly hits (at least not to my knowledge) this should be regarded a feature + // rather than a bug. + //state.mFriendlyHits = mFriendlyHits; state.mTalkedTo = mTalkedTo; state.mAlarmed = mAlarmed; state.mAttacked = mAttacked; @@ -544,7 +547,6 @@ namespace MWMechanics mDead = state.mDead; mDied = state.mDied; mMurdered = state.mMurdered; - mFriendlyHits = state.mFriendlyHits; mTalkedTo = state.mTalkedTo; mAlarmed = state.mAlarmed; mAttacked = state.mAttacked; diff --git a/components/esm/creaturestats.cpp b/components/esm/creaturestats.cpp index cac5cc0a6..75c1c28bc 100644 --- a/components/esm/creaturestats.cpp +++ b/components/esm/creaturestats.cpp @@ -24,8 +24,8 @@ void ESM::CreatureStats::load (ESMReader &esm) mMurdered = false; esm.getHNOT (mMurdered, "MURD"); - mFriendlyHits = 0; - esm.getHNOT (mFriendlyHits, "FRHT"); + if (esm.isNextSub("FRHT")) + esm.skipHSub(); // Friendly hits, no longer used mTalkedTo = false; esm.getHNOT (mTalkedTo, "TALK"); @@ -140,9 +140,6 @@ void ESM::CreatureStats::save (ESMWriter &esm) const if (mMurdered) esm.writeHNT ("MURD", mMurdered); - if (mFriendlyHits) - esm.writeHNT ("FRHT", mFriendlyHits); - if (mTalkedTo) esm.writeHNT ("TALK", mTalkedTo); @@ -235,7 +232,6 @@ void ESM::CreatureStats::blank() mDead = false; mDied = false; mMurdered = false; - mFriendlyHits = 0; mTalkedTo = false; mAlarmed = false; mAttacked = false; diff --git a/components/esm/creaturestats.hpp b/components/esm/creaturestats.hpp index 91ee98333..2a03136d0 100644 --- a/components/esm/creaturestats.hpp +++ b/components/esm/creaturestats.hpp @@ -42,7 +42,6 @@ namespace ESM bool mDead; bool mDied; bool mMurdered; - int mFriendlyHits; bool mTalkedTo; bool mAlarmed; bool mAttacked;