scrawl
3732979eec
Revert "Merge pull request #993 from mrcheko/pathfinding"
...
This reverts commit 5190275b37
, reversing
changes made to d7845012bf
.
9 years ago
scrawl
30b549124e
Fix use-after-free
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
c2b51112f2
AI package cleanups
9 years ago
Allofich
55ac1fab68
Change Wander duration to run on a counter
9 years ago
Allofich
bce66c629a
Change editor-placed AI packages to cycle
9 years ago
scrawl
5edfe8c41c
Reduce the wander fast forward overcrowding offset ( Fixes #3370 )
9 years ago
Austin Salgat
be16857f96
Fix wrong height being used for water detection
9 years ago
Austin Salgat
e9157e9200
Fix idle animation and Fix water creature manual wandering
9 years ago
Austin Salgat
3dec10c686
Update variable to prevent underflowing
...
While not an issue presently, the variable may be used in the future in a way that could create issues if it underflows.
9 years ago
Austin Salgat
84179c262f
Update manual wandering to prevent actor from leaving/entering water
...
Water creatures will stay in the water, while land creatures will stay on land when wandering.
9 years ago
Austin Salgat
fc03216d48
Refactor to reuse existing obstacle detection
9 years ago
Austin Salgat
34726c24d9
Fix mDistance being reset prematurely
...
This was causing wandering without pathgrids to become disabled for most wandering units. Additionally, wandering now behaves the same for both NPCs and creatures.
9 years ago
Austin Salgat
92b352989a
Add logic for NPC wandering without pathgrids
9 years ago
Austin Salgat
c02881a4f8
Fix creatures not wandering
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
Austin Salgat
96231e17f0
Fix wandering NPCs going off pathgrid
...
If multiple pathgrids exist in the same cell, sometimes an NPC would port to a different pathgrid that was nearby. This is an issue since it allowed them to do things like travel through walls to inaccessible areas. Now they will only wander along the closest connected pathgrid.
9 years ago
scrawl
90a99991d1
Use empty() instead of !size()
9 years ago
scrawl
50ed061154
AiWander: reset mAllowedNodes on cell change ( Fixes #3176 , Fixes #3130 )
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
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
1dfe438a5d
reduce "reset if stuck" AiWander timeout.
...
Now is about 14 seconds, instead of 300.
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
Marc Zinnschlag
a52b947efe
Merge remote-tracking branch 'dteviot/MagicEffectsRefactorDraft3'
10 years ago
dteviot
77a1d947cc
extracted MWMechanics::getPlayer()
10 years ago
dteviot
85bc41dedb
replaced FLT_MAX with numeric_limits.
10 years ago
dteviot
942a987d52
centralize the world/cell coordinate conversion logic.
10 years ago
Arthur Moore
08d5aaf0fc
Remove more comments
10 years ago
Arthur Moore
6fce49bfb5
Don't warn twice when unable to play an idle animation
10 years ago
Arthur Moore
61c3835637
Don't try to play animations we know are bad
...
Prevents log spam
10 years ago
Arthur Moore
5ea596f38d
Refactor onChooseActionStatePerFrameActions
...
This prevents playIdle errors from tyring to play idleAnimation 0
10 years ago
Arthur Moore
f69de1f263
Alert the user if trying to play a non-idle animation
...
Continue to propagate success/failure up the call stack.
10 years ago
dteviot
c7aacaee70
extracted function returnToStartLocation().
10 years ago
dteviot
5e519ef550
extract function isPackageFinished().
10 years ago
dteviot
ad0d807103
extracted function reactionTimeActions().
10 years ago
dteviot
9c0e3d6c28
extracted functions doPerFrameActionsForState() and onChooseActionStatePerFrameActions().
10 years ago
dteviot
76f95eafe7
extract function onWalkingStatePerFrameActions().
10 years ago
dteviot
5ec310dfba
extract function onIdleStatePerFrameActions().
10 years ago
dteviot
00eef585af
renamed mPlayedIdle to mIdleAnimation.
10 years ago
dteviot
22f49128cc
replaced multiple booleans with single state variable.
10 years ago
dteviot
1ed6e95c07
Got rid of some radians to degrees to radians conversions.
10 years ago
dteviot
3ebe9fb34f
renamed mRotate to mTurnActorGivingGreetingToFacePlayer
10 years ago
dteviot
e294cd95cd
extracted function playIdleDialogueRandomly()
10 years ago
dteviot
22059d68f6
Remove duplicated code.
10 years ago
dteviot
0b089a5564
extracted function evadeObstacles()
10 years ago
dteviot
1ef78b1e56
extracted playGreetingIfPlayerGetsTooClose()
10 years ago
dteviot
df421fce92
extracted function setPathToAnAllowedNode()
10 years ago