Commit Graph

53 Commits (1f2349ef6e82b7b1b82e1de6db2776e2043fb18d)

Author SHA1 Message Date
scrawl c50b18b3bb
Move PathgridGraph out of CellStore
By definition this is not 'Mutable state of a cell' and does not belong in CellStore.

This change should improve startup times (graph is now loaded on demand) and edits to 'pathgrid.hpp' no longer cause the entirety of OpenMW to be rebuilt.
7 years ago
Leon Krieg 739cd5ba45 Fixed more spelling mistakes 8 years ago
mrcheko aa441f2648 AiPackage: fix path recalc on cell change
AiTravel: remove unneeded code
8 years ago
mrcheko 612c7f1a2f Revert "Revert "Merge pull request #993 from mrcheko/pathfinding""
This reverts commit 3732979eec.
8 years ago
scrawl 3732979eec Revert "Merge pull request #993 from mrcheko/pathfinding"
This reverts commit 5190275b37, reversing
changes made to d7845012bf.
9 years ago
mrcheko 59a1a6d117 checkWayIsClear: remove PATHFIND_CAUTION_DIST check 9 years ago
mrcheko d2fe6fe857 Merge remote-tracking branch 'refs/remotes/origin/master' into pathfinding
# Conflicts:
#	apps/openmw/mwmechanics/aiactivate.cpp
#	apps/openmw/mwmechanics/aicombat.cpp
#	apps/openmw/mwmechanics/aicombat.hpp
#	apps/openmw/mwmechanics/aifollow.cpp
#	apps/openmw/mwmechanics/aipackage.cpp
#	apps/openmw/mwmechanics/aipackage.hpp
#	apps/openmw/mwmechanics/aiwander.cpp
#	apps/openmw/mwmechanics/aiwander.hpp
9 years ago
Allofich b1be3596dc Cleanup of #include statements 9 years ago
Austin Salgat 38f5a225ea Refactor PathFinder functions to be useable by AiWander
This avoids having to duplicate the distanceSquared and getClosestPoint functions.
9 years ago
mrcheko d7d5cc6689 Merge remote-tracking branch 'upstream/master' into pathfinding
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
	apps/openmw/mwmechanics/aifollow.cpp
	apps/openmw/mwmechanics/aipackage.cpp
	apps/openmw/mwmechanics/aipackage.hpp
	apps/openmw/mwmechanics/aiwander.cpp
	apps/openmw/mwmechanics/pathfinding.hpp

Ogre::Vector3->osg::Vec3f; REACTION_INTERVAL->AI_REACTION_TIME; MakeOgreVec3->MakeOsgVec3
9 years ago
dteviot 21e249cb92 pass parameters as const & 10 years ago
dteviot 1ed6e95c07 Got rid of some radians to degrees to radians conversions. 10 years ago
dteviot 1239667cb4 AiWander uses points between PathGrid points (Fixes #1317)
When there is only on PathGrid point within a NPC's wander distance, expand possible wander destinations by using positions between PathGrid points.
10 years ago
mrcheko c773ed9f9a move checkWayIsClear to pathfinding; move shortcut logic to separate func (AiPackage::shortcutPath); rework AiPackage::pathTo 10 years ago
dteviot 164994f3d3 Made PathFinder::buildPath() private.
Now all paths are built by calling PathFinder::buildSyncedPath().
Also removed useless comment.
10 years ago
scrawl c719b7038e Merge branch 'master' of https://github.com/OpenMW/openmw into osg 10 years ago
scrawl cad18969e3 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
	apps/openmw/mwmechanics/aitravel.cpp
10 years ago
dteviot 520fbd63c4 simplified pathfinding code.
remove mIsPathConstructed.  Instead call !mPath.empty().
10 years ago
dteviot cb8ca2f03a Moved logic for building a Sync'ed path from AiCombat to PathFinding.
Is now used by AiFollow, which should fix "running in circles" bug caused when recalc a path and closest way point is the one NPC has just passed.
10 years ago
scrawl 4bb3cbf0fb Remove last remains of Ogre 10 years ago
scrawl b70383d127 Remove last remains of Ogre math 10 years ago
scrawl 7bacb9418d Various math code ported to osg 10 years ago
scrawl 9cf9c2876e Pathgrid rendering 10 years ago
dteviot eb1090a1b6 Waypoint check only considers X & Y distance (Fixes #2423)
When pathfinder checks if actor has reached a waypoint, ignore actor's altitude.
10 years ago
dteviot ca8c8c6aa4 fixing MSVC 2013 warning C4244: & C4305
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
10 years ago
scrawl a17252eab3 Remove unused checkWaypoint function
It was an almost exact copy of the checkPathCompleted function anyway.
10 years ago
scrawl 4d9100091d Reduce default pathing arrival tolerance to 32 units (Fixes #1605) 10 years ago
scrawl 7252cb63a6 Fix cppcheck issues 10 years ago
Thomas 2c74ea381e Moved pathfinding code to aiPackage, implemented it's use with aiFollow and aiPursue 11 years ago
mrcheko 9e79fb5b87 fix to broken aiwander logic 11 years ago
mrcheko e8f7d12c01 uninit bool and invalid iterator bugs fixes 11 years ago
mrcheko 6a3dddfb9a merge master 11 years ago
mrcheko f3626adc86 remake of z-moving in combat for flying/swimming enemies 11 years ago
mrcheko f811abb752 pathgrid shortcutting extended 11 years ago
cc9cii 040d4f8fc4 Move PathgridGraph into separate files. 11 years ago
cc9cii 98f77714ce Per-cell pathgrid data and calculation moved off PathFinder. Now the edge cost calculations and strongly connected component searches are done only once per cell. Per-actor data and methods still remain with PathFinder.
This version still has debugging statements and needs cleaning up.
11 years ago
cc9cii 07fd801d94 My previous analysis of the pathfinding issue was incorrect. It was in fact caused due to some of the pathgrid points being unreachable. Instead of returning an empty path in such a scenario, incorrect path + requested destination were being returned. There was also a defect where past cost was being used for selecting open points.
There is still an unresolved issue where mGraph and mSCComp are being rebuilt unnecessarily.  The check mCell != cell in buildPath() is being triggered frequently. Not sure why.
11 years ago
scrawl c8c0e5de38 Fixed code issues found with unity build. Missing include guards, duplicated functions, ... 11 years ago
scrawl 39d86a9468 Improvements to smooth NPC steering 11 years ago
mrcheko 3a5da7e6e8 merged with master 11 years ago
gus 764011dd1b clean up 11 years ago
mrcheko 87e83a92f8 refactoring of setting an attack type 11 years ago
mrcheko 339399f8b1 bug fix/logic fix/future suggestion 11 years ago
gus 5d038423ec attempt to solve Bug #1009 by not building graph every frame 11 years ago
gus ccf07f9406 Bugfix 11 years ago
gus 1ac3d99c78 pathfinding now works in AICombat. 11 years ago
Chris Robinson 82a09a988b Minor pathfinding cleanup 12 years ago
Torben Carrington 73a9671742 Pathfinding Overhaul - Changed the name of checkIfNextPointReached to a more intuitive name considering what it does (checkPathCompleted) and fixed a minor bug in it, modified buildPath() to take one final parameter, a bool which dictates whether or not to always use pathfinding (like AIWander should be doing) or to allow for "shortcuts", modified all ai packages to work with these two changes. 12 years ago
Torben Carrington c080785235 Pathfinding Overhaul - Finished cleaning, removed unnecessary parameter in one function, fixed use of the function in ai packages and added use of clearPath() function in aiwander, fixed algorithms and got rid of excess subtractions in getDistance functions (thanks to Chris!). 12 years ago
Torben Carrington 7b465ae4f1 Pathfinding Overhaul - Even more cleanup and spacing corrections, small renaming (more to come), removed a few unnecessary actions that wasted CPU time and tmp RAM. 12 years ago