forked from mirror/openmw-tes3mp
store additional state of lights in saved game files
parent
ec7cb90ca4
commit
900532a6ca
@ -0,0 +1,21 @@
|
||||
|
||||
#include "lightstate.hpp"
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
|
||||
void ESM::LightState::load (ESMReader &esm)
|
||||
{
|
||||
ObjectState::load (esm);
|
||||
|
||||
mTime = 0;
|
||||
esm.getHNOT (mTime, "LTIM");
|
||||
}
|
||||
|
||||
void ESM::LightState::save (ESMWriter &esm, bool inInventory) const
|
||||
{
|
||||
ObjectState::save (esm, inInventory);
|
||||
|
||||
if (mTime)
|
||||
esm.writeHNT ("LTIM", mTime);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
#ifndef OPENMW_ESM_LIGHTSTATE_H
|
||||
#define OPENMW_ESM_LIGHTSTATE_H
|
||||
|
||||
#include "objectstate.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
// format 0, saved games only
|
||||
|
||||
struct LightState : public ObjectState
|
||||
{
|
||||
float mTime;
|
||||
|
||||
virtual void load (ESMReader &esm);
|
||||
virtual void save (ESMWriter &esm, bool inInventory = false) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue