Do not save thrown state for projectiles

new-script-api
Miloslav Číž 7 years ago
parent 3dbcda6686
commit 38bda3bd71

@ -565,8 +565,6 @@ namespace MWWorld
state.mVelocity = it->mVelocity;
state.mAttackStrength = it->mAttackStrength;
state.mThrown = it->mThrown;
state.save(writer);
writer.endRecord(ESM::REC_PROJ);
@ -604,7 +602,6 @@ namespace MWWorld
state.mVelocity = esm.mVelocity;
state.mIdArrow = esm.mId;
state.mAttackStrength = esm.mAttackStrength;
state.mThrown = esm.mThrown;
std::string model;
try
@ -612,6 +609,7 @@ namespace MWWorld
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), esm.mId);
MWWorld::Ptr ptr = ref.getPtr();
model = ptr.getClass().getModel(ptr);
state.mThrown = ptr.get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanThrown;
}
catch(...)
{

@ -52,7 +52,6 @@ namespace ESM
esm.writeHNString ("BOW_", mBowId);
esm.writeHNT ("VEL_", mVelocity);
esm.writeHNT ("STR_", mAttackStrength);
esm.writeHNT ("THR_", mThrown);
}
void ProjectileState::load(ESMReader &esm)
@ -64,9 +63,6 @@ namespace ESM
mAttackStrength = 1.f;
esm.getHNOT(mAttackStrength, "STR_");
mThrown = false;
esm.getHNOT (mThrown, "THR_");
}
}

@ -42,7 +42,6 @@ namespace ESM
std::string mBowId;
Vector3 mVelocity;
float mAttackStrength;
bool mThrown;
void load (ESMReader &esm);
void save (ESMWriter &esm) const;

Loading…
Cancel
Save