1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'init_door' into 'master'

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

See merge request OpenMW/openmw!3105
This commit is contained in:
psi29a 2023-06-04 09:21:20 +00:00
commit e6d4b0e8e9
3 changed files with 5 additions and 3 deletions

View File

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

View File

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

View File

@ -60,7 +60,7 @@ namespace ESM4
{ {
FormId destDoor; FormId destDoor;
ESM::Position destPos; 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 struct RadioStationData