diff --git a/apps/openmw/mwworld/projectilemanager.cpp b/apps/openmw/mwworld/projectilemanager.cpp index 1d53c1909..1c080aec1 100644 --- a/apps/openmw/mwworld/projectilemanager.cpp +++ b/apps/openmw/mwworld/projectilemanager.cpp @@ -567,6 +567,9 @@ namespace MWWorld state.mVelocity = it->mVelocity; state.mAttackStrength = it->mAttackStrength; + state.mThrown = it->mThrown; + state.mTime = it->mTime; + state.save(writer); writer.endRecord(ESM::REC_PROJ); @@ -604,6 +607,8 @@ namespace MWWorld state.mVelocity = esm.mVelocity; state.mIdArrow = esm.mId; state.mAttackStrength = esm.mAttackStrength; + state.mThrown = esm.mThrown; + state.mTime = esm.mTime; std::string model; try diff --git a/components/esm/projectilestate.cpp b/components/esm/projectilestate.cpp index 8ade9d5b2..1c8a10bcb 100644 --- a/components/esm/projectilestate.cpp +++ b/components/esm/projectilestate.cpp @@ -52,6 +52,8 @@ namespace ESM esm.writeHNString ("BOW_", mBowId); esm.writeHNT ("VEL_", mVelocity); esm.writeHNT ("STR_", mAttackStrength); + esm.writeHNT ("THR_", mThrown); + esm.writeHNT ("TIM_", mTime); } void ProjectileState::load(ESMReader &esm) @@ -63,6 +65,12 @@ namespace ESM mAttackStrength = 1.f; esm.getHNOT(mAttackStrength, "STR_"); + + mThrown = false; + esm.getHNOT (mThrown, "THR_"); + + mTime = 0.f; + esm.getHNOT (mTime, "TIM_"); } } diff --git a/components/esm/projectilestate.hpp b/components/esm/projectilestate.hpp index 67ec89bb6..625d34b6a 100644 --- a/components/esm/projectilestate.hpp +++ b/components/esm/projectilestate.hpp @@ -42,6 +42,8 @@ namespace ESM std::string mBowId; Vector3 mVelocity; float mAttackStrength; + float mTime; + bool mThrown; void load (ESMReader &esm); void save (ESMWriter &esm) const;