Merge branch 'init_door' into 'master'

Add default initializers for ESM::Position and ESM4::TeleportDest::flags

See merge request OpenMW/openmw!3105
macos_ci
psi29a 2 years ago
commit e6d4b0e8e9

@ -42,10 +42,10 @@ namespace ESM
// Position and rotation
struct Position
{
float pos[3];
float pos[3]{};
// In radians
float rot[3];
float rot[3]{};
osg::Vec3f asVec3() const { return osg::Vec3f(pos[0], pos[1], pos[2]); }

@ -103,6 +103,8 @@ void ESM4::Reference::load(ESM4::Reader& reader)
reader.get(mDoor.destPos);
if (esmVer == ESM::VER_094 || esmVer == ESM::VER_170 || isFONV)
reader.get(mDoor.flags); // not in Obvlivion
else
mDoor.flags = 0;
// std::cout << "REFR dest door: " << formIdToString(mDoor.destDoor) << std::endl;// FIXME
break;
}

@ -60,7 +60,7 @@ namespace ESM4
{
FormId destDoor;
ESM::Position destPos;
std::uint32_t flags; // 0x01 no alarm (only in TES5)
std::uint32_t flags = 0; // 0x01 no alarm (only in TES5)
};
struct RadioStationData

Loading…
Cancel
Save