Commit Graph

64 Commits (520e65f82205480a6286d6c51129c0715ec13149)

Author SHA1 Message Date
Andrei Kortunov 81b78a82e8 AI: try to open doors every AI_REACTION_TIME seconds (bug #4454) 7 years ago
Andrei Kortunov fed10e87aa Store integer actor ID in AI packages (bug #4036) 7 years ago
Capostrophic 5b49248d6e
Restrict opening doors to bipedal actors (Fixes #4313) 7 years ago
Andrei Kortunov f7f8dfaf2a AiWander: do not allow flying/swimming creatures to use pathgrid 7 years ago
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
Andrei Kortunov 37952c9a79 Added door detection based by ray casting 8 years ago
Andrei Kortunov e9d0bf7c12 Added missed return statement 8 years ago
Andrei Kortunov 188424d5d3 Allow AI to use keys to open doors 8 years ago
Andrei Kortunov 4600f24e27 Playing sound when AI is opening a door 8 years ago
scrawl 1362264561 Fix warning 8 years ago
mrcheko 72786fef9d prevent running in circles around path points
addresses http://bugs.openmw.org/issues/2229
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 203804ff15 fix AiPackage repeating 9 years ago
mrcheko b4e94e2aae Merge remote-tracking branch 'upstream/master' into pathfinding
# Conflicts:
#	apps/openmw/mwmechanics/aipackage.cpp
#	apps/openmw/mwmechanics/aipackage.hpp
9 years ago
Allofich c57d177f1c Trim unneeded code 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
mrcheko 0793e4a80e refactor pathfinding code in AiWander: use AiPackage::pathTo, reuse AiPackage::ObstacleCheck 9 years ago
Allofich b1be3596dc Cleanup of #include statements 9 years ago
Allofich 065d6a391d Don't repeat sequences of only one non-wander AI 9 years ago
Allofich bce66c629a Change editor-placed AI packages to cycle 9 years ago
scrawl c4d38bb42d Fix clang analyzer warnings 9 years ago
scrawl d3b76b7006 Don't stack Ai packages (Fixes #3101, Fixes #3080, Fixes #2697) 9 years ago
mrcheko bcb1f4ed05 refactor AiCombat: remove all pathfinding code, adopt new version of
AiPackage::pathTo;
fix couple of warnings;
9 years ago
mrcheko b960b0af93 rewrite pathTo for clearer logic; reapply Scrawl's aifollow threshold 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
scrawl 53f4b92426 AiEscort do not follow target through doors
Testing revealed a problem where the guard on the prison ship would incorrectly follow the player outside. Upon further investigation in vanilla MW, it appears that with AiEscort the actor only follows the target through doors once the AiEscort package has completed, *and* no new AI package is running yet.
9 years ago
scrawl 965bea45c0 AiEscort makes the actor side with target in fights (Bug #2697)
Also will follow the player through teleport doors.
9 years ago
scrawl 8459a79a2c Fix AI being able to open locked doors (Fixes #2948) 9 years ago
dteviot 0feae19140 AiCombat use evadeObstacles() from AiPackage. 9 years ago
dteviot 8e2fe1985d Fixed errors pointed out by Zini.
1. Removed "Actor" from name of function  isActorNearInactiveCell().
2. Corrected case of CoordinateConverter member function names.
9 years ago
dteviot 6f97187bb6 Fix travis warning about no newline at end of file. 9 years ago
dteviot 573a14993a Moved isActorNearInactiveCell() logic to own function.
Also, triggers when actor is near edge of cell, not when less than 1/2 way to edge.
9 years ago
dteviot f2c9b9351f Try going right and left to "unstick" actor. 9 years ago
dteviot 31d82b6b0c Unifiy evadeObstacles() logic between AiWander and AiPackage
Can't use same code, but logic is now same.
9 years ago
dteviot f59e918a3b removed useless code.
zTurn ignores turns < 0.0087 radians.
9 years ago
dteviot 0677799839 movement logic in AiPackage uses ObstacleCheck. 9 years ago
dteviot 77a1d947cc extracted MWMechanics::getPlayer() 10 years ago
dteviot 55e3aaaa35 made variable const. 10 years ago
dteviot 0884a3796f extracted function isTargetMagicallyHidden(). 10 years ago
scrawl 278076e609 Include cleanup 10 years ago
dteviot 1ed6e95c07 Got rid of some radians to degrees to radians conversions. 10 years ago
mrcheko c773ed9f9a move checkWayIsClear to pathfinding; move shortcut logic to separate func (AiPackage::shortcutPath); rework AiPackage::pathTo 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 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
dteviot 6d7e6cd30c AiTravel logic merged into AiPackage. 10 years ago
scrawl 4bb3cbf0fb Remove last remains of Ogre 10 years ago
scrawl 7bacb9418d Various math code ported to osg 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