From 1e1c8a17edc9e15c7a64c58a29cbebe73e52264c Mon Sep 17 00:00:00 2001 From: psi29a Date: Sat, 19 Jun 2021 13:34:36 +0000 Subject: [PATCH] Merge branch 'fix_new_game_guard_2' into 'master' Reapply new game guard fix See merge request OpenMW/openmw!944 (cherry picked from commit eca0a95a5a16cf3734a32c76cab0c0a0dd6dfe2d) 56e63053 Revert "Merge branch 'fix_new_game_guard' into 'master'" e5e04b85 Consider time to destination when try to avoid collision --- apps/openmw/mwmechanics/aipackage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/aipackage.cpp b/apps/openmw/mwmechanics/aipackage.cpp index 0701f42cf..bfcea2d31 100644 --- a/apps/openmw/mwmechanics/aipackage.cpp +++ b/apps/openmw/mwmechanics/aipackage.cpp @@ -476,6 +476,6 @@ osg::Vec3f MWMechanics::AiPackage::getNextPathPoint(const osg::Vec3f& destinatio float MWMechanics::AiPackage::getNextPathPointTolerance(float speed, float duration, const osg::Vec3f& halfExtents) const { if (mPathFinder.getPathSize() <= 1) - return mLastDestinationTolerance; + return std::max(DEFAULT_TOLERANCE, mLastDestinationTolerance); return getPointTolerance(speed, duration, halfExtents); }