Commit Graph

154 Commits (move)

Author SHA1 Message Date
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
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
dteviot b508846a64 Renamed mStoredAvailableNodes to mPopulateAvailableNodes.
Don't call getAllowedNodes() needlessly.
10 years ago
dteviot f1774ee7c3 Fixed compile failing on OSX and Linux. 10 years ago
dteviot 52cf8541f5 End point tolerance restored to 64 units.
Corrected problem pointed out by Scrawl.
Destination needs tolerance of 64 to avoid overcrowding.
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
dteviot eb2aa965b9 Extracted function SetCurrentNodeToClosestAllowedNode() 10 years ago
dteviot f942db2b27 Simplified code. 10 years ago
dteviot 9a02a85a24 Pulled duplicate code into function. 10 years ago
dteviot fae93e3d82 Bugfix: was not resetting mStuckCount. 10 years ago
dteviot 46a654286b Remove fix for #1317
Expanding the AiWander distance for path grid nodes causes bigger problems than it solved.
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 59db9664ba Pass the CharacterController to AiPackage::execute 10 years ago
scrawl a5670b5133 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/opencs/CMakeLists.txt
	apps/opencs/main.cpp
	apps/openmw/mwworld/player.hpp
10 years ago
dteviot c65e7a31e7 Aquatic creatures no longer try to get onto land.
AiWander for aquatic creatures no longer uses path grid points as they're usually on land.
10 years ago
scrawl 3663511cdb Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/opencs/CMakeLists.txt
	extern/ogre-ffmpeg-videoplayer/CMakeLists.txt
10 years ago
scrawl 5347d407d8 Disallow AiWander fast-forward for water creatures
Pathgrid nodes are usually above the water level, so appearing at a random node would have the creature break out of the water level it's supposed to be constrained to.
10 years ago
scrawl 98a77f68a3 Fix AiWander::fastForward using incorrect pathgrid coordinates when actor recently moved to a new cell 10 years ago
scrawl 4bb3cbf0fb Remove last remains of Ogre 10 years ago
scrawl 7bacb9418d Various math code ported to osg 10 years ago
scrawl fd50be0fb8 Restore various gameplay 10 years ago