From 38042fd7a247213bcb08eb7a7046a38b143b2ae7 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Tue, 5 Jul 2022 17:19:47 +0400 Subject: [PATCH] Init missing variables --- apps/essimporter/importacdt.cpp | 2 ++ apps/openmw/mwworld/store.cpp | 4 ++++ apps/openmw/mwworld/worldimp.cpp | 1 + components/fx/widgets.hpp | 6 ++---- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/essimporter/importacdt.cpp b/apps/essimporter/importacdt.cpp index 69760a6bdb..bab9b7b6b9 100644 --- a/apps/essimporter/importacdt.cpp +++ b/apps/essimporter/importacdt.cpp @@ -9,6 +9,8 @@ namespace ESSImport void ActorData::load(ESM::ESMReader &esm) { + blank(); + if (esm.isNextSub("ACTN")) { /* diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 9d6e11f141..794b87bdfd 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -528,6 +528,10 @@ namespace MWWorld newCell.mAmbi.mSunlight = 0; newCell.mAmbi.mFog = 0; newCell.mAmbi.mFogDensity = 0; + newCell.mCellId.mPaged = true; + newCell.mCellId.mIndex.mX = x; + newCell.mCellId.mIndex.mY = y; + return &mExt.insert(std::make_pair(key, newCell)).first->second; } const ESM::Cell *Store::find(const std::string &id) const diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 66e2dfa69c..1f5532655d 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -460,6 +460,7 @@ namespace MWWorld ESM::GameSetting record; record.mId = params.first; record.mValue = params.second; + record.mRecordFlags = 0; mStore.insertStatic(record); } } diff --git a/components/fx/widgets.hpp b/components/fx/widgets.hpp index 67f7883a67..061bd2d959 100644 --- a/components/fx/widgets.hpp +++ b/components/fx/widgets.hpp @@ -76,8 +76,6 @@ namespace fx MYGUI_RTTI_DERIVED(EditNumber) public: - EditNumber() : mLastPointerX(0) {} - void setValue(T value) { mValue = value; @@ -241,9 +239,9 @@ namespace fx MyGUI::Widget* mDragger{nullptr}; MyGUI::Widget* mFill{nullptr}; MyGUI::TextBox* mValueLabel{nullptr}; - T mValue; + T mValue{}; - int mLastPointerX; + int mLastPointerX{0}; }; class EditNumberFloat4 : public EditNumber { MYGUI_RTTI_DERIVED(EditNumberFloat4) };