diff --git a/CHANGELOG.md b/CHANGELOG.md index ec3fe41ab..f938c00ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ Bug #4965: Global light attenuation settings setup is lacking Bug #4969: "Miss" sound plays for any actor Bug #4972: Player is able to use quickkeys while disableplayerfighting is active + Bug #4979: AiTravel maximum range depends on "actors processing range" setting Feature #2229: Improve pathfinding AI Feature #3442: Default values for fallbacks from ini file Feature #3610: Option to invert X axis diff --git a/apps/openmw/mwmechanics/aitravel.cpp b/apps/openmw/mwmechanics/aitravel.cpp index a2876da4f..018756aea 100644 --- a/apps/openmw/mwmechanics/aitravel.cpp +++ b/apps/openmw/mwmechanics/aitravel.cpp @@ -3,7 +3,6 @@ #include #include "../mwbase/environment.hpp" -#include "../mwbase/mechanicsmanager.hpp" #include "../mwbase/world.hpp" #include "../mwworld/class.hpp" @@ -19,9 +18,8 @@ bool isWithinMaxRange(const osg::Vec3f& pos1, const osg::Vec3f& pos2) { // Maximum travel distance for vanilla compatibility. // Was likely meant to prevent NPCs walking into non-loaded exterior cells, but for some reason is used in interior cells as well. - // The specific range below is configurable, but its limit is currently 7168 units. Anything greater will break shoddily-written content (*cough* MW *cough*) in bizarre ways. - float aiDistance = MWBase::Environment::get().getMechanicsManager()->getActorsProcessingRange(); - return (pos1 - pos2).length2() <= aiDistance*aiDistance; + // We can make this configurable at some point, but the default *must* be the below value. Anything else will break shoddily-written content (*cough* MW *cough*) in bizarre ways. + return (pos1 - pos2).length2() <= 7168*7168; } } diff --git a/docs/source/reference/modding/settings/game.rst b/docs/source/reference/modding/settings/game.rst index a27399b22..639770122 100644 --- a/docs/source/reference/modding/settings/game.rst +++ b/docs/source/reference/modding/settings/game.rst @@ -109,6 +109,8 @@ actors processing range This setting allows to specify a distance from player in game units, in which OpenMW updates actor's state. Actor state update includes AI, animations, and physics processing. Actors near that border start softly fade out instead of just appearing/disapperaing. +It is not recommended to change this value from default if you use mods with +long-range AiTravel packages (e.g. patrols, caravans and travellers). This setting can be controlled in game with the "Actors processing range slider" in the Prefs panel of the Options menu.