mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-02 20:39:42 +00:00
Do not save thrown state for projectiles
This commit is contained in:
parent
3dbcda6686
commit
38bda3bd71
3 changed files with 1 additions and 8 deletions
|
@ -565,8 +565,6 @@ namespace MWWorld
|
||||||
state.mVelocity = it->mVelocity;
|
state.mVelocity = it->mVelocity;
|
||||||
state.mAttackStrength = it->mAttackStrength;
|
state.mAttackStrength = it->mAttackStrength;
|
||||||
|
|
||||||
state.mThrown = it->mThrown;
|
|
||||||
|
|
||||||
state.save(writer);
|
state.save(writer);
|
||||||
|
|
||||||
writer.endRecord(ESM::REC_PROJ);
|
writer.endRecord(ESM::REC_PROJ);
|
||||||
|
@ -604,7 +602,6 @@ namespace MWWorld
|
||||||
state.mVelocity = esm.mVelocity;
|
state.mVelocity = esm.mVelocity;
|
||||||
state.mIdArrow = esm.mId;
|
state.mIdArrow = esm.mId;
|
||||||
state.mAttackStrength = esm.mAttackStrength;
|
state.mAttackStrength = esm.mAttackStrength;
|
||||||
state.mThrown = esm.mThrown;
|
|
||||||
|
|
||||||
std::string model;
|
std::string model;
|
||||||
try
|
try
|
||||||
|
@ -612,6 +609,7 @@ namespace MWWorld
|
||||||
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), esm.mId);
|
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), esm.mId);
|
||||||
MWWorld::Ptr ptr = ref.getPtr();
|
MWWorld::Ptr ptr = ref.getPtr();
|
||||||
model = ptr.getClass().getModel(ptr);
|
model = ptr.getClass().getModel(ptr);
|
||||||
|
state.mThrown = ptr.get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanThrown;
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,7 +52,6 @@ namespace ESM
|
||||||
esm.writeHNString ("BOW_", mBowId);
|
esm.writeHNString ("BOW_", mBowId);
|
||||||
esm.writeHNT ("VEL_", mVelocity);
|
esm.writeHNT ("VEL_", mVelocity);
|
||||||
esm.writeHNT ("STR_", mAttackStrength);
|
esm.writeHNT ("STR_", mAttackStrength);
|
||||||
esm.writeHNT ("THR_", mThrown);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectileState::load(ESMReader &esm)
|
void ProjectileState::load(ESMReader &esm)
|
||||||
|
@ -64,9 +63,6 @@ namespace ESM
|
||||||
|
|
||||||
mAttackStrength = 1.f;
|
mAttackStrength = 1.f;
|
||||||
esm.getHNOT(mAttackStrength, "STR_");
|
esm.getHNOT(mAttackStrength, "STR_");
|
||||||
|
|
||||||
mThrown = false;
|
|
||||||
esm.getHNOT (mThrown, "THR_");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ namespace ESM
|
||||||
std::string mBowId;
|
std::string mBowId;
|
||||||
Vector3 mVelocity;
|
Vector3 mVelocity;
|
||||||
float mAttackStrength;
|
float mAttackStrength;
|
||||||
bool mThrown;
|
|
||||||
|
|
||||||
void load (ESMReader &esm);
|
void load (ESMReader &esm);
|
||||||
void save (ESMWriter &esm) const;
|
void save (ESMWriter &esm) const;
|
||||||
|
|
Loading…
Reference in a new issue