summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelsid <elsid.mail@gmail.com>2022-06-26 16:42:29 +0200
committerelsid <elsid.mail@gmail.com>2022-06-26 16:42:29 +0200
commitfdf6e58ea3e0b750b1570158a5cae4a35112053e (patch)
tree18e0b98782ca0eef74275bdd6885b0f5cd13ae12
parent39d7f2c95b4e828a62149eb1c09f3e42b0db230c (diff)
Split apps/openmw/mwmechanics/actorutil.hppsplit_actorutil_hpp
-rw-r--r--apps/openmw/mwbase/mechanicsmanager.hpp4
-rw-r--r--apps/openmw/mwclass/container.cpp2
-rw-r--r--apps/openmw/mwclass/creature.cpp16
-rw-r--r--apps/openmw/mwclass/creaturelevlist.cpp6
-rw-r--r--apps/openmw/mwclass/npc.cpp9
-rw-r--r--apps/openmw/mwgui/alchemywindow.cpp1
-rw-r--r--apps/openmw/mwgui/inventorywindow.cpp1
-rw-r--r--apps/openmw/mwgui/pickpocketitemmodel.cpp1
-rw-r--r--apps/openmw/mwgui/spellbuyingwindow.cpp4
-rw-r--r--apps/openmw/mwgui/spellcreationdialog.cpp5
-rw-r--r--apps/openmw/mwgui/travelwindow.cpp4
-rw-r--r--apps/openmw/mwmechanics/actor.hpp5
-rw-r--r--apps/openmw/mwmechanics/actors.hpp1
-rw-r--r--apps/openmw/mwmechanics/actorutil.cpp10
-rw-r--r--apps/openmw/mwmechanics/actorutil.hpp82
-rw-r--r--apps/openmw/mwmechanics/aisetting.hpp40
-rw-r--r--apps/openmw/mwmechanics/creaturecustomdataresetter.hpp20
-rw-r--r--apps/openmw/mwmechanics/greetingstate.hpp14
-rw-r--r--apps/openmw/mwmechanics/inventory.hpp42
-rw-r--r--apps/openmw/mwphysics/mtphysics.cpp4
-rw-r--r--apps/openmw/mwrender/renderingmanager.cpp6
-rw-r--r--apps/openmw/mwscript/containerextensions.cpp2
-rw-r--r--apps/openmw/mwworld/actionopen.cpp1
-rw-r--r--apps/openmw/mwworld/actionteleport.cpp2
-rw-r--r--apps/openmw/mwworld/containerstore.cpp2
-rw-r--r--apps/openmw/mwworld/weather.cpp1
-rw-r--r--apps/openmw/mwworld/worldimp.cpp1
27 files changed, 182 insertions, 104 deletions
diff --git a/apps/openmw/mwbase/mechanicsmanager.hpp b/apps/openmw/mwbase/mechanicsmanager.hpp
index b6e167ab9e..e542883012 100644
--- a/apps/openmw/mwbase/mechanicsmanager.hpp
+++ b/apps/openmw/mwbase/mechanicsmanager.hpp
@@ -5,9 +5,9 @@
#include <vector>
#include <set>
#include <cstdint>
+#include <map>
-#include "../mwmechanics/actorutil.hpp"
-// For MWMechanics::GreetingState
+#include "../mwmechanics/greetingstate.hpp"
#include "../mwworld/ptr.hpp"
diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp
index 9f9666534d..38c55cdd52 100644
--- a/apps/openmw/mwclass/container.cpp
+++ b/apps/openmw/mwclass/container.cpp
@@ -27,8 +27,8 @@
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
-#include "../mwmechanics/actorutil.hpp"
#include "../mwmechanics/npcstats.hpp"
+#include "../mwmechanics/inventory.hpp"
namespace MWClass
{
diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp
index 026ef268fe..b587fdf146 100644
--- a/apps/openmw/mwclass/creature.cpp
+++ b/apps/openmw/mwclass/creature.cpp
@@ -12,6 +12,12 @@
#include "../mwmechanics/disease.hpp"
#include "../mwmechanics/spellcasting.hpp"
#include "../mwmechanics/difficultyscaling.hpp"
+#include "../mwmechanics/npcstats.hpp"
+#include "../mwmechanics/combat.hpp"
+#include "../mwmechanics/actorutil.hpp"
+#include "../mwmechanics/creaturecustomdataresetter.hpp"
+#include "../mwmechanics/aisetting.hpp"
+#include "../mwmechanics/inventory.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/mechanicsmanager.hpp"
@@ -27,18 +33,14 @@
#include "../mwworld/containerstore.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/localscripts.hpp"
+#include "../mwworld/inventorystore.hpp"
+#include "../mwworld/esmstore.hpp"
#include "../mwrender/renderinginterface.hpp"
#include "../mwrender/objects.hpp"
#include "../mwgui/tooltips.hpp"
-#include "../mwworld/inventorystore.hpp"
-
-#include "../mwmechanics/npcstats.hpp"
-#include "../mwmechanics/combat.hpp"
-#include "../mwmechanics/actorutil.hpp"
-
namespace
{
bool isFlagBitSet(const MWWorld::ConstPtr &ptr, ESM::Creature::Flags bitMask)
@@ -117,7 +119,7 @@ namespace MWClass
{
auto tempData = std::make_unique<CreatureCustomData>();
CreatureCustomData* data = tempData.get();
- MWMechanics::CreatureCustomDataResetter resetter(ptr);
+ MWMechanics::CreatureCustomDataResetter resetter {ptr};
ptr.getRefData().setCustomData(std::move(tempData));
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
diff --git a/apps/openmw/mwclass/creaturelevlist.cpp b/apps/openmw/mwclass/creaturelevlist.cpp
index f22fbaebaa..431f9675b6 100644
--- a/apps/openmw/mwclass/creaturelevlist.cpp
+++ b/apps/openmw/mwclass/creaturelevlist.cpp
@@ -7,8 +7,14 @@
#include "../mwworld/cellstore.hpp"
#include "../mwworld/customdata.hpp"
+#include "../mwworld/esmstore.hpp"
+#include "../mwworld/manualref.hpp"
+
#include "../mwmechanics/creaturestats.hpp"
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
+
namespace MWClass
{
class CreatureLevListCustomData : public MWWorld::TypedCustomData<CreatureLevListCustomData>
diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp
index 74de6fb764..5f2ce00690 100644
--- a/apps/openmw/mwclass/npc.cpp
+++ b/apps/openmw/mwclass/npc.cpp
@@ -12,6 +12,9 @@
#include <components/esm3/loadnpc.hpp>
#include <components/esm3/npcstate.hpp>
#include <components/settings/settings.hpp>
+#include <components/esm3/loadrace.hpp>
+#include <components/esm3/loadclas.hpp>
+#include <components/esm3/loadnpc.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
@@ -31,6 +34,9 @@
#include "../mwmechanics/difficultyscaling.hpp"
#include "../mwmechanics/weapontype.hpp"
#include "../mwmechanics/actorutil.hpp"
+#include "../mwmechanics/creaturecustomdataresetter.hpp"
+#include "../mwmechanics/inventory.hpp"
+#include "../mwmechanics/aisetting.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontalk.hpp"
@@ -40,6 +46,7 @@
#include "../mwworld/customdata.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/localscripts.hpp"
+#include "../mwworld/esmstore.hpp"
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
@@ -311,7 +318,7 @@ namespace MWClass
bool recalculate = false;
auto tempData = std::make_unique<NpcCustomData>();
NpcCustomData* data = tempData.get();
- MWMechanics::CreatureCustomDataResetter resetter(ptr);
+ MWMechanics::CreatureCustomDataResetter resetter {ptr};
ptr.getRefData().setCustomData(std::move(tempData));
MWWorld::LiveCellRef<ESM::NPC> *ref = ptr.get<ESM::NPC>();
diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp
index 618017a7cd..fd4a21cf10 100644
--- a/apps/openmw/mwgui/alchemywindow.cpp
+++ b/apps/openmw/mwgui/alchemywindow.cpp
@@ -16,6 +16,7 @@
#include "../mwmechanics/actorutil.hpp"
#include "../mwworld/class.hpp"
+#include "../mwworld/esmstore.hpp"
#include <MyGUI_Macros.h>
#include <components/esm/records.hpp>
diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp
index 8279da089e..f7cbc30ae1 100644
--- a/apps/openmw/mwgui/inventorywindow.cpp
+++ b/apps/openmw/mwgui/inventorywindow.cpp
@@ -28,6 +28,7 @@
#include "../mwworld/actionequip.hpp"
#include "../mwmechanics/npcstats.hpp"
+#include "../mwmechanics/actorutil.hpp"
#include "itemview.hpp"
#include "inventoryitemmodel.hpp"
diff --git a/apps/openmw/mwgui/pickpocketitemmodel.cpp b/apps/openmw/mwgui/pickpocketitemmodel.cpp
index 2b4d474059..976485c23a 100644
--- a/apps/openmw/mwgui/pickpocketitemmodel.cpp
+++ b/apps/openmw/mwgui/pickpocketitemmodel.cpp
@@ -12,6 +12,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/mechanicsmanager.hpp"
#include "../mwbase/windowmanager.hpp"
+#include "../mwbase/world.hpp"
namespace MWGui
{
diff --git a/apps/openmw/mwgui/spellbuyingwindow.cpp b/apps/openmw/mwgui/spellbuyingwindow.cpp
index 716fd7a0b5..934936f1ab 100644
--- a/apps/openmw/mwgui/spellbuyingwindow.cpp
+++ b/apps/openmw/mwgui/spellbuyingwindow.cpp
@@ -4,6 +4,8 @@
#include <MyGUI_Button.h>
#include <MyGUI_ScrollView.h>
+#include <components/misc/stringops.hpp>
+
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/windowmanager.hpp"
@@ -11,7 +13,9 @@
#include "../mwworld/class.hpp"
#include "../mwworld/containerstore.hpp"
+#include "../mwworld/esmstore.hpp"
+#include "../mwmechanics/actorutil.hpp"
namespace MWGui
{
diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp
index 9bfd72adce..4fa6076ec9 100644
--- a/apps/openmw/mwgui/spellcreationdialog.cpp
+++ b/apps/openmw/mwgui/spellcreationdialog.cpp
@@ -10,11 +10,16 @@
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/mechanicsmanager.hpp"
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
#include "../mwworld/containerstore.hpp"
#include "../mwworld/class.hpp"
+#include "../mwworld/store.hpp"
+#include "../mwworld/esmstore.hpp"
#include "../mwmechanics/spellutil.hpp"
+#include "../mwmechanics/actorutil.hpp"
#include "tooltips.hpp"
#include "class.hpp"
diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp
index 0553b5c368..1cdb22d88f 100644
--- a/apps/openmw/mwgui/travelwindow.cpp
+++ b/apps/openmw/mwgui/travelwindow.cpp
@@ -5,6 +5,7 @@
#include <MyGUI_Gui.h>
#include <components/settings/settings.hpp>
+#include <components/esm3/loadgmst.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
@@ -16,7 +17,10 @@
#include "../mwworld/actionteleport.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/cellutils.hpp"
+#include "../mwworld/store.hpp"
+#include "../mwworld/esmstore.hpp"
+#include "../mwmechanics/actorutil.hpp"
namespace MWGui
{
diff --git a/apps/openmw/mwmechanics/actor.hpp b/apps/openmw/mwmechanics/actor.hpp
index 14f21193ea..3a3b0baa67 100644
--- a/apps/openmw/mwmechanics/actor.hpp
+++ b/apps/openmw/mwmechanics/actor.hpp
@@ -3,8 +3,11 @@
#include <memory>
-#include "actorutil.hpp"
#include "character.hpp"
+#include "greetingstate.hpp"
+
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
#include <components/misc/timer.hpp>
diff --git a/apps/openmw/mwmechanics/actors.hpp b/apps/openmw/mwmechanics/actors.hpp
index 7b54a98198..ff9face4f3 100644
--- a/apps/openmw/mwmechanics/actors.hpp
+++ b/apps/openmw/mwmechanics/actors.hpp
@@ -7,7 +7,6 @@
#include <list>
#include <map>
-#include "actorutil.hpp"
#include "actor.hpp"
namespace ESM
diff --git a/apps/openmw/mwmechanics/actorutil.cpp b/apps/openmw/mwmechanics/actorutil.cpp
index 4a587dd662..4e1b7706db 100644
--- a/apps/openmw/mwmechanics/actorutil.cpp
+++ b/apps/openmw/mwmechanics/actorutil.cpp
@@ -6,6 +6,8 @@
#include "../mwworld/class.hpp"
#include "../mwworld/player.hpp"
+#include <components/esm3/loadmgef.hpp>
+
namespace MWMechanics
{
MWWorld::Ptr getPlayer()
@@ -29,12 +31,4 @@ namespace MWMechanics
const MWMechanics::MagicEffects& effects = actor.getClass().getCreatureStats(actor).getMagicEffects();
return effects.get(ESM::MagicEffect::WaterWalking).getMagnitude() > 0;
}
-
- CreatureCustomDataResetter::CreatureCustomDataResetter(const MWWorld::Ptr& ptr) : mPtr(ptr) {}
-
- CreatureCustomDataResetter::~CreatureCustomDataResetter()
- {
- if(!mPtr.isEmpty())
- mPtr.getRefData().setCustomData({});
- }
}
diff --git a/apps/openmw/mwmechanics/actorutil.hpp b/apps/openmw/mwmechanics/actorutil.hpp
index 91770ddfec..608e26774e 100644
--- a/apps/openmw/mwmechanics/actorutil.hpp
+++ b/apps/openmw/mwmechanics/actorutil.hpp
@@ -1,19 +1,6 @@
#ifndef OPENMW_MWMECHANICS_ACTORUTIL_H
#define OPENMW_MWMECHANICS_ACTORUTIL_H
-#include <algorithm>
-
-#include <components/esm3/loadcont.hpp>
-#include <components/esm3/loadcrea.hpp>
-#include <components/esm3/loadnpc.hpp>
-
-#include "../mwbase/environment.hpp"
-#include "../mwbase/world.hpp"
-
-#include "../mwworld/esmstore.hpp"
-
-#include "./creaturestats.hpp"
-
namespace MWWorld
{
class Ptr;
@@ -21,79 +8,10 @@ namespace MWWorld
namespace MWMechanics
{
- enum GreetingState
- {
- Greet_None,
- Greet_InProgress,
- Greet_Done
- };
-
MWWorld::Ptr getPlayer();
bool isPlayerInCombat();
bool canActorMoveByZAxis(const MWWorld::Ptr& actor);
bool hasWaterWalking(const MWWorld::Ptr& actor);
-
- template<class T>
- void setBaseAISetting(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value)
- {
- T copy = *MWBase::Environment::get().getWorld()->getStore().get<T>().find(id);
- switch(setting)
- {
- case MWMechanics::CreatureStats::AiSetting::AI_Hello:
- copy.mAiData.mHello = value;
- break;
- case MWMechanics::CreatureStats::AiSetting::AI_Fight:
- copy.mAiData.mFight = value;
- break;
- case MWMechanics::CreatureStats::AiSetting::AI_Flee:
- copy.mAiData.mFlee = value;
- break;
- case MWMechanics::CreatureStats::AiSetting::AI_Alarm:
- copy.mAiData.mAlarm = value;
- break;
- default:
- assert(0);
- }
- MWBase::Environment::get().getWorld()->createOverrideRecord(copy);
- }
-
- template<class T>
- void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount)
- {
- T copy = *MWBase::Environment::get().getWorld()->getStore().get<T>().find(actorId);
- for(auto& it : copy.mInventory.mList)
- {
- if(Misc::StringUtils::ciEqual(it.mItem, itemId))
- {
- int sign = it.mCount < 1 ? -1 : 1;
- it.mCount = sign * std::max(it.mCount * sign + amount, 0);
- MWBase::Environment::get().getWorld()->createOverrideRecord(copy);
- return;
- }
- }
- if(amount > 0)
- {
- ESM::ContItem cont;
- cont.mItem = itemId;
- cont.mCount = amount;
- copy.mInventory.mList.push_back(cont);
- MWBase::Environment::get().getWorld()->createOverrideRecord(copy);
- }
- }
-
- template void setBaseAISetting<ESM::Creature>(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value);
- template void setBaseAISetting<ESM::NPC>(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value);
- template void modifyBaseInventory<ESM::Creature>(const std::string& actorId, const std::string& itemId, int amount);
- template void modifyBaseInventory<ESM::NPC>(const std::string& actorId, const std::string& itemId, int amount);
- template void modifyBaseInventory<ESM::Container>(const std::string& containerId, const std::string& itemId, int amount);
-
- struct CreatureCustomDataResetter
- {
- MWWorld::Ptr mPtr;
-
- CreatureCustomDataResetter(const MWWorld::Ptr& ptr);
- ~CreatureCustomDataResetter();
- };
}
#endif
diff --git a/apps/openmw/mwmechanics/aisetting.hpp b/apps/openmw/mwmechanics/aisetting.hpp
new file mode 100644
index 0000000000..d11769ac6f
--- /dev/null
+++ b/apps/openmw/mwmechanics/aisetting.hpp
@@ -0,0 +1,40 @@
+#ifndef OPENMW_MWMECHANICS_AISETTING_H
+#define OPENMW_MWMECHANICS_AISETTING_H
+
+#include <string>
+
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
+
+#include "../mwworld/esmstore.hpp"
+
+#include "creaturestats.hpp"
+
+namespace MWMechanics
+{
+ template<class T>
+ void setBaseAISetting(const std::string& id, MWMechanics::CreatureStats::AiSetting setting, int value)
+ {
+ T copy = *MWBase::Environment::get().getWorld()->getStore().get<T>().find(id);
+ switch (setting)
+ {
+ case MWMechanics::CreatureStats::AiSetting::AI_Hello:
+ copy.mAiData.mHello = value;
+ break;
+ case MWMechanics::CreatureStats::AiSetting::AI_Fight:
+ copy.mAiData.mFight = value;
+ break;
+ case MWMechanics::CreatureStats::AiSetting::AI_Flee:
+ copy.mAiData.mFlee = value;
+ break;
+ case MWMechanics::CreatureStats::AiSetting::AI_Alarm:
+ copy.mAiData.mAlarm = value;
+ break;
+ default:
+ assert(false);
+ }
+ MWBase::Environment::get().getWorld()->createOverrideRecord(copy);
+ }
+}
+
+#endif
diff --git a/apps/openmw/mwmechanics/creaturecustomdataresetter.hpp b/apps/openmw/mwmechanics/creaturecustomdataresetter.hpp
new file mode 100644
index 0000000000..667a0b9c45
--- /dev/null
+++ b/apps/openmw/mwmechanics/creaturecustomdataresetter.hpp
@@ -0,0 +1,20 @@
+#ifndef OPENMW_MWMECHANICS_CREATURECUSTOMDATARESETTER_H
+#define OPENMW_MWMECHANICS_CREATURECUSTOMDATARESETTER_H
+
+#include "../mwworld/ptr.hpp"
+
+namespace MWMechanics
+{
+ struct CreatureCustomDataResetter
+ {
+ MWWorld::Ptr mPtr;
+
+ ~CreatureCustomDataResetter()
+ {
+ if (!mPtr.isEmpty())
+ mPtr.getRefData().setCustomData({});
+ }
+ };
+}
+
+#endif
diff --git a/apps/openmw/mwmechanics/greetingstate.hpp b/apps/openmw/mwmechanics/greetingstate.hpp
new file mode 100644
index 0000000000..9b37096322
--- /dev/null
+++ b/apps/openmw/mwmechanics/greetingstate.hpp
@@ -0,0 +1,14 @@
+#ifndef OPENMW_MWMECHANICS_GREETINGSTATE_H
+#define OPENMW_MWMECHANICS_GREETINGSTATE_H
+
+namespace MWMechanics
+{
+ enum GreetingState
+ {
+ Greet_None,
+ Greet_InProgress,
+ Greet_Done
+ };
+}
+
+#endif
diff --git a/apps/openmw/mwmechanics/inventory.hpp b/apps/openmw/mwmechanics/inventory.hpp
new file mode 100644
index 0000000000..ddd4b3351a
--- /dev/null
+++ b/apps/openmw/mwmechanics/inventory.hpp
@@ -0,0 +1,42 @@
+#ifndef OPENMW_MWMECHANICS_INVENTORY_H
+#define OPENMW_MWMECHANICS_INVENTORY_H
+
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
+
+#include "../mwworld/esmstore.hpp"
+
+#include <components/misc/stringops.hpp>
+#include <components/esm3/loadcont.hpp>
+
+#include <algorithm>
+#include <string>
+
+namespace MWMechanics
+{
+ template <class T>
+ void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount)
+ {
+ T copy = *MWBase::Environment::get().getWorld()->getStore().get<T>().find(actorId);
+ for (auto& it : copy.mInventory.mList)
+ {
+ if (Misc::StringUtils::ciEqual(it.mItem, itemId))
+ {
+ const int sign = it.mCount < 1 ? -1 : 1;
+ it.mCount = sign * std::max(it.mCount * sign + amount, 0);
+ MWBase::Environment::get().getWorld()->createOverrideRecord(copy);
+ return;
+ }
+ }
+ if (amount > 0)
+ {
+ ESM::ContItem cont;
+ cont.mItem = itemId;
+ cont.mCount = amount;
+ copy.mInventory.mList.push_back(cont);
+ MWBase::Environment::get().getWorld()->createOverrideRecord(copy);
+ }
+ }
+}
+
+#endif
diff --git a/apps/openmw/mwphysics/mtphysics.cpp b/apps/openmw/mwphysics/mtphysics.cpp
index cb8e520384..9bc6f942f0 100644
--- a/apps/openmw/mwphysics/mtphysics.cpp
+++ b/apps/openmw/mwphysics/mtphysics.cpp
@@ -9,11 +9,15 @@
#include <components/misc/barrier.hpp>
#include "components/misc/convert.hpp"
#include "components/settings/settings.hpp"
+
#include "../mwmechanics/actorutil.hpp"
#include "../mwmechanics/movement.hpp"
#include "../mwrender/bulletdebugdraw.hpp"
#include "../mwworld/class.hpp"
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
+
#include "actor.hpp"
#include "contacttestwrapper.h"
#include "movementsolver.hpp"
diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp
index cbee0ba07d..449217fa68 100644
--- a/apps/openmw/mwrender/renderingmanager.cpp
+++ b/apps/openmw/mwrender/renderingmanager.cpp
@@ -52,14 +52,18 @@
#include <components/detournavigator/navigator.hpp>
-#include "../mwbase/windowmanager.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/class.hpp"
#include "../mwworld/groundcoverstore.hpp"
+
#include "../mwgui/loadingscreen.hpp"
#include "../mwgui/postprocessorhud.hpp"
+
#include "../mwmechanics/actorutil.hpp"
+
#include "../mwbase/windowmanager.hpp"
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
#include "sky.hpp"
#include "effectmanager.hpp"
diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp
index 11e9095e2c..bb63ec84cc 100644
--- a/apps/openmw/mwscript/containerextensions.cpp
+++ b/apps/openmw/mwscript/containerextensions.cpp
@@ -14,6 +14,7 @@
#include <components/misc/stringops.hpp>
#include <components/esm3/loadskil.hpp>
+#include <components/esm3/loadlevlist.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
@@ -26,6 +27,7 @@
#include "../mwworld/containerstore.hpp"
#include "../mwworld/inventorystore.hpp"
#include "../mwworld/manualref.hpp"
+#include "../mwworld/esmstore.hpp"
#include "../mwmechanics/actorutil.hpp"
#include "../mwmechanics/levelledlist.hpp"
diff --git a/apps/openmw/mwworld/actionopen.cpp b/apps/openmw/mwworld/actionopen.cpp
index 266ea4d95f..61f2f3e30c 100644
--- a/apps/openmw/mwworld/actionopen.cpp
+++ b/apps/openmw/mwworld/actionopen.cpp
@@ -5,6 +5,7 @@
#include "../mwbase/windowmanager.hpp"
#include "../mwmechanics/disease.hpp"
+#include "../mwmechanics/actorutil.hpp"
namespace MWWorld
{
diff --git a/apps/openmw/mwworld/actionteleport.cpp b/apps/openmw/mwworld/actionteleport.cpp
index 644e23a521..bbf4952063 100644
--- a/apps/openmw/mwworld/actionteleport.cpp
+++ b/apps/openmw/mwworld/actionteleport.cpp
@@ -1,5 +1,7 @@
#include "actionteleport.hpp"
+#include <components/esm3/loadcell.hpp>
+
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/mechanicsmanager.hpp"
diff --git a/apps/openmw/mwworld/containerstore.cpp b/apps/openmw/mwworld/containerstore.cpp
index 14a19c482c..140582c1a8 100644
--- a/apps/openmw/mwworld/containerstore.cpp
+++ b/apps/openmw/mwworld/containerstore.cpp
@@ -5,6 +5,7 @@
#include <components/debug/debuglog.hpp>
#include <components/esm3/inventorystate.hpp>
+#include <components/misc/stringops.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
@@ -19,6 +20,7 @@
#include "class.hpp"
#include "localscripts.hpp"
#include "player.hpp"
+#include "esmstore.hpp"
namespace
{
diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp
index 1e12d0b1dd..74cab7a461 100644
--- a/apps/openmw/mwworld/weather.cpp
+++ b/apps/openmw/mwworld/weather.cpp
@@ -8,6 +8,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/world.hpp"
#include "../mwmechanics/actorutil.hpp"
diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp
index de90c2e52a..628ac60727 100644
--- a/apps/openmw/mwworld/worldimp.cpp
+++ b/apps/openmw/mwworld/worldimp.cpp
@@ -47,6 +47,7 @@
#include "../mwmechanics/combat.hpp"
#include "../mwmechanics/aiavoiddoor.hpp" //Used to tell actors to avoid doors
#include "../mwmechanics/summoning.hpp"
+#include "../mwmechanics/actorutil.hpp"
#include "../mwrender/animation.hpp"
#include "../mwrender/npcanimation.hpp"