From 144862aa35333c3854bcf7bec135df71b9ab1984 Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 29 Jun 2021 21:41:15 +0200 Subject: [PATCH] Define default actor half extents in settings Player's half extents may change over time when wolfskin model is used for example. Having it in settings is a more presistent approach. --- apps/openmw/mwworld/worldimp.cpp | 5 +++-- docs/source/reference/modding/settings/game.rst | 9 +++++++++ files/settings-default.cfg | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 4fd9235586..b9ef635263 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -135,7 +135,9 @@ namespace MWWorld : mResourceSystem(resourceSystem), mLocalScripts (mStore), mCells (mStore, mEsm), mSky (true), mGodMode(false), mScriptsEnabled(true), mDiscardMovements(true), mContentFiles (contentFiles), - mUserDataPath(userDataPath), mShouldUpdateNavigator(false), + mUserDataPath(userDataPath), + mDefaultHalfExtents(Settings::Manager::getVector3("default actor pathfind half extents", "Game")), + mShouldUpdateNavigator(false), mActivationDistanceOverride (activationDistanceOverride), mStartCell(startCell), mDistanceToFacedObject(-1.f), mTeleportEnabled(true), mLevitationEnabled(true), mGoToJail(false), mDaysInPrison(0), @@ -2471,7 +2473,6 @@ namespace MWWorld applyLoopingParticles(player); - mDefaultHalfExtents = mPhysics->getOriginalHalfExtents(getPlayerPtr()); mNavigator->addAgent(getPathfindingHalfExtents(getPlayerConstPtr())); } diff --git a/docs/source/reference/modding/settings/game.rst b/docs/source/reference/modding/settings/game.rst index 878485b3b3..fb7b537701 100644 --- a/docs/source/reference/modding/settings/game.rst +++ b/docs/source/reference/modding/settings/game.rst @@ -455,3 +455,12 @@ If disabled actors without the ability to swim will not follow other actors to t Has effect only when Navigator is enabled. This setting can be controlled in Advanced tab of the launcher. + +default actor pathfind half extents +----------------------------------- + +:Type: 3D vector floating point +:Range: All components > 0 +:Default: 29.27999496459961 28.479997634887695 66.5 + +Actor half extents used for exterior cells to generate navmesh. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 5ed8109465..27a9544ea6 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -373,6 +373,9 @@ graphic herbalism = true # (true, false) allow actors to follow over water surface = true +# Default size of actor for navmesh generation +default actor pathfind half extents = 29.27999496459961 28.479997634887695 66.5 + [General] # Anisotropy reduces distortion in textures at low angles (e.g. 0 to 16).