diff --git a/components/esm/defs.hpp b/components/esm/defs.hpp index 265e355871..abe433ca55 100644 --- a/components/esm/defs.hpp +++ b/components/esm/defs.hpp @@ -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]); } diff --git a/components/esm4/loadrefr.cpp b/components/esm4/loadrefr.cpp index 36c646bc11..0de47bf37f 100644 --- a/components/esm4/loadrefr.cpp +++ b/components/esm4/loadrefr.cpp @@ -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; } diff --git a/components/esm4/loadrefr.hpp b/components/esm4/loadrefr.hpp index 4ae4aea757..2a795a000d 100644 --- a/components/esm4/loadrefr.hpp +++ b/components/esm4/loadrefr.hpp @@ -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