mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Save new projectile state
This commit is contained in:
parent
de42aa9d03
commit
2b9a0a7732
3 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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_");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue