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