mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Init structs to make sure that we do not store a random data
This commit is contained in:
parent
5faf56950b
commit
5d51f3ea26
2 changed files with 4 additions and 7 deletions
|
@ -53,23 +53,20 @@ namespace MWWorld
|
|||
|
||||
const ESM::Cell* createEsmCell(ESM::ExteriorCellLocation location, ESMStore& store)
|
||||
{
|
||||
ESM::Cell record;
|
||||
ESM::Cell record = {};
|
||||
record.mData.mFlags = ESM::Cell::HasWater;
|
||||
record.mData.mX = location.mX;
|
||||
record.mData.mY = location.mY;
|
||||
record.mWater = 0;
|
||||
record.mMapColor = 0;
|
||||
record.updateId();
|
||||
return store.insert(record);
|
||||
}
|
||||
|
||||
const ESM4::Cell* createEsm4Cell(ESM::ExteriorCellLocation location, ESMStore& store)
|
||||
{
|
||||
ESM4::Cell record;
|
||||
ESM4::Cell record = {};
|
||||
record.mParent = location.mWorldspace;
|
||||
record.mX = location.mX;
|
||||
record.mY = location.mY;
|
||||
record.mCellFlags = 0;
|
||||
return store.insert(record);
|
||||
}
|
||||
|
||||
|
|
|
@ -169,8 +169,8 @@ namespace ESM4
|
|||
, currCellGrid(FormId{ 0, 0 })
|
||||
, cellGridValid(false)
|
||||
{
|
||||
subRecordHeader.typeId = 0;
|
||||
subRecordHeader.dataSize = 0;
|
||||
recordHeader = {};
|
||||
subRecordHeader = {};
|
||||
}
|
||||
|
||||
Reader::Reader(Files::IStreamPtr&& esmStream, const std::filesystem::path& filename, VFS::Manager const* vfs,
|
||||
|
|
Loading…
Reference in a new issue