Evil Eye
d2a28d915a
Don't consider a path completed unless we're close
2020-12-25 15:58:11 +01:00
Petr Mikheev
71ba94a89a
Smooth turning; smooth stopping; combat headtracking
2020-09-22 22:50:44 +02:00
psi29a
f90a049702
Merge branch 'movement_refactoring' into 'master'
...
Refactoring related to "smooth movement"
See merge request OpenMW/openmw!285
(cherry picked from commit 6eaf0a389d5aed3b74ab1a7cf89574612f964bdf)
e847b4c8 Split getSpeed() to getMaxSpeed() and getCurrentSpeed()
a96c46bc Refactor calculation of movement.mSpeedFactor
03ee9090 Use getMaxSpeed instead of getCurrentSpeed where it makes sense.
a178af5c Create helper functions `normalizeAngle` and `rotateVec2f`
2020-08-27 11:54:30 +00:00
Bret Curtis
c944acf26b
Merge pull request #2913 from akortunov/warnfix
...
Get rid of ECLD and dependencies
2020-06-17 15:00:57 +02:00
Andrei Kortunov
d1a3cc98ff
Get rid of ECLD and dependencies
2020-06-17 13:09:16 +04:00
Bret Curtis
1db58575c8
Fixed missed AiPackageTypeId::Wander 'fix'
2020-06-17 09:58:18 +02:00
Alexei Dobrohotov
2d23dad2bc
Merge branch 'master' into ai_package_type
2020-06-17 01:47:23 +03:00
elsid
b095ca6c86
Use actor speed to define area cost for pathfinding
2020-06-13 02:24:52 +02:00
elsid
c4cd3b2c4f
Add pathgrid to navmesh as off mesh connection
2020-06-12 21:04:02 +02:00
elsid
82893c30f4
Store package type id as enum except ESM
2020-06-11 21:02:27 +02:00
elsid
5b34ef224b
Replace AiPackage virtual methods by options
2020-06-06 12:00:17 +02:00
elsid
3b5ce71d71
Remove redundant explicit dtor definition for AiPackage
2020-05-17 22:18:26 +02:00
elsid
e323e6e7e6
Consider moved distance in direction to destination for obstacle check
...
Assume actor is stuck when it's not able to move in the destination
direction with maximum speed. Approach to check moved distance from the
previous point doesn't work good for slow and big actors. When they face
obstacle they're trying to move along with oscillation so check is
passing but they don't get any closer to the destination.
2020-01-20 23:46:58 +01:00
Andrei Kortunov
6861d9d5e5
Merge pull request #2510 from elsid/ai_open_door
...
Open door when it is on the way to a next path point (bug #5073 )
2019-11-17 21:21:22 +04:00
elsid
81832f8e17
Reuse distance functions
2019-10-19 12:51:37 +02:00
elsid
d1d6ba3ed0
Fix rebuild path for walking actors
...
Ignore z coordinate for not swimming nor flying actors to calculate
distance from actor destination to last path point. If walking actor
destination point is floating above the ground then a point on navmesh
may be too far away when z coordinate is included. In this case path
will be rebuild on each AI_REACTION_TIME.
2019-10-07 20:25:07 +02:00
elsid
209e33f5ce
Open door when it is on the way to a next path point
2019-09-15 21:16:00 +02:00
elsid
653a391084
Do not open doors when actor has no path
...
When actor is not going anywhere it doesn't require to go through doors
so there is no need to open them.
2019-09-15 21:12:33 +02:00
elsid
d4b7b3e999
Check for AiPackage type before find nearby door
2019-09-15 21:12:29 +02:00
Roman Siromakha
41ad23ebdc
Revert "[WIP] Open door when it is on the way to a next path point (bug #5073 )"
2019-08-27 20:55:03 +02:00
elsid
b4ec444057
Open door when it is on the way to a next path point
2019-08-27 20:49:35 +02:00
elsid
97cd9d434a
Do not open doors when actor has no path
...
When actor is not going anywhere it doesn't require to go through doors
so there is no need to open them.
2019-08-27 20:49:35 +02:00
elsid
389f5dfb9b
Check for AiPackage type before find nearby door
2019-08-27 20:49:35 +02:00
elsid
16170131b7
Add enum type for door state
2019-08-25 15:21:00 +02:00
elsid
f684c90932
Make angular velocity depending on actor speed
...
To avoid moving in circles for actors with high speed.
2019-08-03 16:06:04 +02:00
Capostrophic
25e52f7dfe
Use 2D distance for fight rating of vertically moving actors (bug #4961 )
2019-06-05 21:41:02 +03:00
Andrei Kortunov
1832f1759d
AI: use a consistent check if a target is hidden (bug #4920 )
2019-04-28 16:41:10 +04:00
Bret Curtis
2ab7f903d7
make use of std::make_unique to test that MSVC2015 can handle that
2019-04-10 11:09:44 +02:00
elsid
8fd6b37e34
Make path point tolerance depending on actor half extents
2019-03-08 22:33:33 +03:00
Andrei Kortunov
dcec9df345
Fix MSVC warning about variable re-declaration
2019-03-07 08:08:13 +04:00
elsid
cf1e1d9f4b
Use min point tolerance to prevent face wrong direction (bug #4814 )
...
When next path point is too close to actor and it has speed 0,
it can face direction not pointing to path target.
2019-03-05 23:18:55 +03:00
elsid
1218e4e15d
Use player half extents only to find path in exterior cells
2019-03-04 22:59:20 +03:00
Bret Curtis
14c93b3df0
Revert "Merge pull request #2204 from elsid/fix_navigator_update"
...
This reverts commit 26fb0e7a0f
, reversing
changes made to 42b2391303
.
2019-03-04 11:06:15 +01:00
elsid
a4f300f810
Use player half extents only to find path in exterior cells
2019-03-03 16:21:09 +03:00
Andrei Kortunov
3032b177a1
Remove redundant includes
2019-02-23 08:02:12 +04:00
Capostrophic
7b33838b33
Don't consider non-solid actors truly levitating (bug #4746 )
2018-12-05 23:37:32 +03:00
Andrei Kortunov
829faf7b2c
Improve toggleactorspaths console command
2018-11-03 10:42:14 +04:00
Capostrophic
1de9674c81
AI package cleanup
2018-11-02 14:58:30 +03:00
elsid
c52db75545
Use default tolerance to drop last point from path
...
Fixes AiEscort. Before actor tried to reach target with 0 tolerance.
Back to logic like it was before 4fe764c3a5
and bbd82a743
commits.
2018-11-02 01:12:41 +03:00
elsid
49d81241db
Merge branch 'master' into pathfinder_detour
2018-10-28 17:08:09 +03:00
Andrei Kortunov
e7de6b974a
Optimize actors processing
...
1. Do not update physics and animations for actors outside processing range (bug #4647 )
2. Do not render such actors
3. Add transparency to actors near processing border, so they will not pop up suddenly
2018-10-25 22:52:59 +04:00
elsid
03d4ce5e49
Log find path exception with level verbose, add more info to message
2018-10-15 23:25:42 +03:00
elsid
7c5bedc35a
Reset shorcutting if actor can't move by z-axis on reaction time
...
If actor was shortcutting because it was swimming, then when it started
walking it still be shortcutting, but there will be no new path, because
shortcut path builds only for actor able moving by z-axis and pathfinder
path only for not shortcutting actor.
2018-10-13 22:16:34 +03:00
elsid
92b34e8bb4
Check whether can actor move along z-axis in separate function
2018-10-13 22:16:34 +03:00
elsid
bbd82a743a
Use different tolerance for path point and destination
2018-10-13 22:16:34 +03:00
elsid
ab090108cb
Assign world to local variable once per function
2018-10-13 22:16:34 +03:00
elsid
27a74725f1
Use osg::Vec3f
2018-10-13 22:16:34 +03:00
elsid
346e9e3141
Add off mesh connections for doors without teleport
2018-10-13 22:16:33 +03:00
elsid
661da42bd2
Build path by navigator
2018-10-13 22:16:33 +03:00
elsid
d02beae5a8
Find path for actors according to their abilities to swim and walk
2018-10-13 22:16:33 +03:00