1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:49:55 +00:00
Commit graph

116 commits

Author SHA1 Message Date
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
elsid
dc09674362
Add command and settings option to enable actors paths render 2018-10-13 22:16:32 +03:00
elsid
4fe764c3a5
Update and check for complete Pathfinder path by different methods 2018-10-13 22:16:24 +03:00
elsid
2c464bd682
Evade obstacles after set rotation 2018-10-13 22:16:22 +03:00
elsid
66e5a4d591
Remove useless variable 2018-10-13 22:16:22 +03:00
elsid
1a95b7a154
Remove duplicate zTurn call 2018-10-13 22:16:22 +03:00
elsid
63b3a70ca8
Remove useless else 2018-10-13 22:16:22 +03:00
elsid
c9f3064cbd
Update ObstacleCheck once per frame 2018-10-13 22:16:22 +03:00
elsid
6d89241178
Check is path completed by osg::Vec3f position 2018-10-13 22:16:21 +03:00
elsid
9b3756f8bc
Store path points in deque 2018-10-13 22:16:20 +03:00
elsid
925d909fea
Use rbegin 2018-10-13 22:16:20 +03:00
elsid
4d868bec92
Use osg::Vec3f to store path nodes in Pathfinder 2018-10-13 22:16:20 +03:00