mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 06:41:08 +00:00
initialise blank global records
This commit is contained in:
parent
8e93bfa607
commit
5cd2fe00ab
@ -265,6 +265,7 @@ namespace CSMWorld
|
||||
{
|
||||
ESXRecordT record;
|
||||
record.mId = id;
|
||||
record.blank();
|
||||
add (record);
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,12 @@ void Global::save(ESMWriter &esm)
|
||||
esm.writeHNT("FLTV", mValue);
|
||||
}
|
||||
|
||||
void Global::blank()
|
||||
{
|
||||
mValue = 0;
|
||||
mType = VT_Float;
|
||||
}
|
||||
|
||||
bool operator== (const Global& left, const Global& right)
|
||||
{
|
||||
return left.mId==right.mId && left.mValue==right.mValue && left.mType==right.mType;
|
||||
|
@ -23,6 +23,9 @@ struct Global
|
||||
|
||||
void load(ESMReader &esm);
|
||||
void save(ESMWriter &esm);
|
||||
|
||||
void blank();
|
||||
///< Set record to default state (does not touch the ID).
|
||||
};
|
||||
|
||||
bool operator== (const Global& left, const Global& right);
|
||||
|
Loading…
x
Reference in New Issue
Block a user