diff --git a/apps/essimporter/importinventory.cpp b/apps/essimporter/importinventory.cpp index 743f2c1cf7..9d71c04f2a 100644 --- a/apps/essimporter/importinventory.cpp +++ b/apps/essimporter/importinventory.cpp @@ -19,6 +19,7 @@ namespace ESSImport item.mCount = contItem.mCount; item.mRelativeEquipmentSlot = -1; item.mLockLevel = 0; + item.mChargeIntRemainder = 0; unsigned int itemCount = std::abs(item.mCount); bool separateStacks = false; diff --git a/apps/opencs/model/world/tablemimedata.cpp b/apps/opencs/model/world/tablemimedata.cpp index 1814e551c1..a966a53eee 100644 --- a/apps/opencs/model/world/tablemimedata.cpp +++ b/apps/opencs/model/world/tablemimedata.cpp @@ -13,6 +13,7 @@ CSMWorld::TableMimeData::TableMimeData(UniversalId id, const CSMDoc::Document& document) : mDocument(document) + , mTableOfDragStart(nullptr) { mUniversalId.push_back(id); mObjectsFormats << QString::fromUtf8(("tabledata/" + id.getTypeName()).c_str()); @@ -21,6 +22,7 @@ CSMWorld::TableMimeData::TableMimeData(UniversalId id, const CSMDoc::Document& d CSMWorld::TableMimeData::TableMimeData(const std::vector& id, const CSMDoc::Document& document) : mUniversalId(id) , mDocument(document) + , mTableOfDragStart(nullptr) { for (std::vector::iterator it(mUniversalId.begin()); it != mUniversalId.end(); ++it) { diff --git a/apps/openmw/mwdialogue/filter.cpp b/apps/openmw/mwdialogue/filter.cpp index e05f1b37c2..5daf6df9cd 100644 --- a/apps/openmw/mwdialogue/filter.cpp +++ b/apps/openmw/mwdialogue/filter.cpp @@ -155,7 +155,7 @@ bool MWDialogue::Filter::testActor(const ESM::DialInfo& info) const if (!isCreature) { MWWorld::LiveCellRef* npc = mActor.get(); - if (info.mData.mGender == (npc->mBase->mFlags & npc->mBase->Female ? 0 : 1)) + if (info.mData.mGender == (npc->mBase->mFlags & ESM::NPC::Female) ? 0 : 1) return false; } diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index 63b6573985..0c1e1cfb98 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -960,7 +960,7 @@ namespace MWGui ActiveTextFormats::iterator i = mActiveTextFormats.find(Font); - if (mNode) + if (mNode && i != mActiveTextFormats.end()) mNode->outOfDate(i->second->mRenderItem); } } diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 1d5b292e6f..63a63d0883 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -931,7 +931,7 @@ namespace MWGui = MWBase::Environment::get().getLuaManager()->getActorControls(player); bool triedToMove = playerControls && (playerControls->mMovement != 0 || playerControls->mSideMovement != 0 || playerControls->mJump); - if (triedToMove && playerCls.getEncumbrance(player) > playerCls.getCapacity(player)) + if (mMessageBoxManager && triedToMove && playerCls.getEncumbrance(player) > playerCls.getCapacity(player)) { const auto& msgboxs = mMessageBoxManager->getActiveMessageBoxes(); auto it diff --git a/apps/openmw/mwlua/types/activator.cpp b/apps/openmw/mwlua/types/activator.cpp index 77ffd384cb..9fec22b221 100644 --- a/apps/openmw/mwlua/types/activator.cpp +++ b/apps/openmw/mwlua/types/activator.cpp @@ -26,6 +26,7 @@ namespace activator.mModel = Misc::ResourceHelpers::meshPathForESM3(rec["model"].get()); std::string_view scriptId = rec["mwscript"].get(); activator.mScript = ESM::RefId::deserializeText(scriptId); + activator.mRecordFlags = 0; return activator; } } diff --git a/apps/openmw/mwlua/types/armor.cpp b/apps/openmw/mwlua/types/armor.cpp index 1006dcefcd..9f28f56e2f 100644 --- a/apps/openmw/mwlua/types/armor.cpp +++ b/apps/openmw/mwlua/types/armor.cpp @@ -40,6 +40,7 @@ namespace armor.mData.mHealth = rec["health"]; armor.mData.mArmor = rec["baseArmor"]; armor.mData.mEnchant = std::round(rec["enchantCapacity"].get() * 10); + armor.mRecordFlags = 0; return armor; } diff --git a/apps/openmw/mwlua/types/book.cpp b/apps/openmw/mwlua/types/book.cpp index 4b40837604..9501691a72 100644 --- a/apps/openmw/mwlua/types/book.cpp +++ b/apps/openmw/mwlua/types/book.cpp @@ -40,6 +40,7 @@ namespace book.mData.mWeight = rec["weight"]; book.mData.mValue = rec["value"]; book.mData.mIsScroll = rec["isScroll"]; + book.mRecordFlags = 0; ESM::RefId skill = ESM::RefId::deserializeText(rec["skill"].get()); diff --git a/apps/openmw/mwlua/types/clothing.cpp b/apps/openmw/mwlua/types/clothing.cpp index 029b084e95..9bdd579286 100644 --- a/apps/openmw/mwlua/types/clothing.cpp +++ b/apps/openmw/mwlua/types/clothing.cpp @@ -32,6 +32,7 @@ namespace clothing.mEnchant = ESM::RefId::deserializeText(enchantId); clothing.mData.mWeight = rec["weight"]; clothing.mData.mValue = rec["value"]; + clothing.mRecordFlags = 0; int clothingType = rec["type"].get(); if (clothingType >= 0 && clothingType <= ESM::Clothing::Amulet) clothing.mData.mType = clothingType; diff --git a/apps/openmw/mwlua/types/ingredient.cpp b/apps/openmw/mwlua/types/ingredient.cpp index cbf1b317f0..8ac3d79855 100644 --- a/apps/openmw/mwlua/types/ingredient.cpp +++ b/apps/openmw/mwlua/types/ingredient.cpp @@ -56,6 +56,7 @@ namespace MWLua effect.mAttribute = rec.mData.mAttributes[i]; effect.mRange = ESM::RT_Self; effect.mArea = 0; + effect.mDuration = 0; res[i + 1] = effect; } return res; diff --git a/apps/openmw/mwlua/types/misc.cpp b/apps/openmw/mwlua/types/misc.cpp index 3a4fba9cec..889f6d6e19 100644 --- a/apps/openmw/mwlua/types/misc.cpp +++ b/apps/openmw/mwlua/types/misc.cpp @@ -31,6 +31,7 @@ namespace misc.mScript = ESM::RefId::deserializeText(scriptId); misc.mData.mWeight = rec["weight"]; misc.mData.mValue = rec["value"]; + misc.mRecordFlags = 0; return misc; } } diff --git a/apps/openmw/mwlua/types/potion.cpp b/apps/openmw/mwlua/types/potion.cpp index 87ef67bf64..46b298d959 100644 --- a/apps/openmw/mwlua/types/potion.cpp +++ b/apps/openmw/mwlua/types/potion.cpp @@ -30,6 +30,7 @@ namespace potion.mScript = ESM::RefId::deserializeText(scriptId); potion.mData.mWeight = rec["weight"]; potion.mData.mValue = rec["value"]; + potion.mRecordFlags = 0; sol::table effectsTable = rec["effects"]; size_t numEffects = effectsTable.size(); potion.mEffects.mList.resize(numEffects); diff --git a/apps/openmw/mwlua/types/weapon.cpp b/apps/openmw/mwlua/types/weapon.cpp index 1f06a4bd70..1cbe9b1d26 100644 --- a/apps/openmw/mwlua/types/weapon.cpp +++ b/apps/openmw/mwlua/types/weapon.cpp @@ -32,6 +32,7 @@ namespace std::string_view scriptId = rec["mwscript"].get(); weapon.mScript = ESM::RefId::deserializeText(scriptId); weapon.mData.mFlags = 0; + weapon.mRecordFlags = 0; if (rec["isMagical"]) weapon.mData.mFlags |= ESM::Weapon::Magical; if (rec["isSilver"]) diff --git a/apps/openmw/mwmechanics/alchemy.cpp b/apps/openmw/mwmechanics/alchemy.cpp index 3d5823ddf2..4c7dc14417 100644 --- a/apps/openmw/mwmechanics/alchemy.cpp +++ b/apps/openmw/mwmechanics/alchemy.cpp @@ -291,6 +291,7 @@ void MWMechanics::Alchemy::addPotion(const std::string& name) newRecord.mData.mValue = mValue; newRecord.mData.mAutoCalc = 0; + newRecord.mRecordFlags = 0; newRecord.mName = name; diff --git a/apps/openmw/mwmechanics/enchanting.cpp b/apps/openmw/mwmechanics/enchanting.cpp index f7393874fb..a852edde8c 100644 --- a/apps/openmw/mwmechanics/enchanting.cpp +++ b/apps/openmw/mwmechanics/enchanting.cpp @@ -69,6 +69,7 @@ namespace MWMechanics enchantment.mData.mFlags = 0; enchantment.mData.mType = mCastStyle; enchantment.mData.mCost = getBaseCastCost(); + enchantment.mRecordFlags = 0; store.remove(mSoulGemPtr, 1); diff --git a/components/esm/esmterrain.hpp b/components/esm/esmterrain.hpp index b8303008c2..9ada20f467 100644 --- a/components/esm/esmterrain.hpp +++ b/components/esm/esmterrain.hpp @@ -29,7 +29,7 @@ namespace ESM float getMaxHeight() const { return mMaxHeight; } int getLandSize() const { return mLandSize; } - int mLoadFlags; + int mLoadFlags = 0; private: float mMinHeight = 0.f; diff --git a/components/nif/node.cpp b/components/nif/node.cpp index a811d3fab5..f61496c6f9 100644 --- a/components/nif/node.cpp +++ b/components/nif/node.cpp @@ -505,7 +505,7 @@ namespace Nif if (flags & BSVertexDesc::VertexAttribute::Eye_Data) { throw Nif::Exception("Unhandled Eye Data in BSTriShape: ", nif->getFile().getFilename()); - nif->read(mEyeData); + // nif->read(mEyeData); } }