Avoid using ESM4::Cell with uninitialized fields

macos_ci
Petr Mikheev 2 years ago
parent 01c410d6b1
commit 5cb4c66266

@ -129,7 +129,7 @@ MWWorld::CellStore& MWWorld::WorldModel::getExterior(ESM::ExteriorCellLocation c
record.mParent = cellIndex.mWorldspace; record.mParent = cellIndex.mWorldspace;
record.mX = cellIndex.mX; record.mX = cellIndex.mX;
record.mY = cellIndex.mY; record.mY = cellIndex.mY;
record.mCellFlags = 0; // Other ESM4::Cell members use default values from class definition.
cell = mStore.insert(record); cell = mStore.insert(record);
} }
CellStore* cellStore CellStore* cellStore

@ -35,16 +35,16 @@ namespace ESM4
// FO3/FNV version of the struct // FO3/FNV version of the struct
struct Lighting struct Lighting
{ // | Aichan Prison values { // | Aichan Prison values
std::uint32_t ambient; // | 16 17 19 00 (RGBA) std::uint32_t ambient = 0; // | 16 17 19 00 (RGBA)
std::uint32_t directional; // | 00 00 00 00 (RGBA) std::uint32_t directional = 0; // | 00 00 00 00 (RGBA)
std::uint32_t fogColor; // | 1D 1B 16 00 (RGBA) std::uint32_t fogColor = 0; // | 1D 1B 16 00 (RGBA)
float fogNear; // Fog Near | 00 00 00 00 = 0.f float fogNear = 0; // Fog Near | 00 00 00 00 = 0.f
float fogFar; // Fog Far | 00 80 3B 45 = 3000.f float fogFar = 0; // Fog Far | 00 80 3B 45 = 3000.f
std::int32_t rotationXY; // rotation xy | 00 00 00 00 = 0 std::int32_t rotationXY = 0; // | 00 00 00 00 = 0
std::int32_t rotationZ; // rotation z | 00 00 00 00 = 0 std::int32_t rotationZ = 0; // | 00 00 00 00 = 0
float fogDirFade; // Fog dir fade | 00 00 80 3F = 1.f float fogDirFade = 0; // | 00 00 80 3F = 1.f
float fogClipDist; // Fog clip dist | 00 80 3B 45 = 3000.f float fogClipDist = 0; // | 00 80 3B 45 = 3000.f
float fogPower = 1.f; // TES4 doesn't have this float fogPower = 1.f; // TES4 doesn't have this
}; };

@ -80,13 +80,13 @@ namespace ESM4
FormId mGlobal; FormId mGlobal;
FormId mClimate; FormId mClimate;
FormId mWater; FormId mWater;
float mWaterHeight = 0; float mWaterHeight = sInvalidWaterLevel;
std::vector<FormId> mRegions; std::vector<FormId> mRegions;
Lighting mLighting; Lighting mLighting;
FormId mLightingTemplate; // FO3/FONV FormId mLightingTemplate; // FO3/FONV
std::uint32_t mLightingTemplateFlags; // FO3/FONV std::uint32_t mLightingTemplateFlags = 0; // FO3/FONV
FormId mMusic; // FO3/FONV FormId mMusic; // FO3/FONV
FormId mAcousticSpace; // FO3/FONV FormId mAcousticSpace; // FO3/FONV

Loading…
Cancel
Save