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

43 commits

Author SHA1 Message Date
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
Andrei Kortunov
e6036e13b9 Use more C++11 loops in game mechanics code 2020-07-25 15:54:49 +04:00
elsid
0c92a567af
Use distance to position since last normal state in obstacle checker 2020-02-10 22:29:54 +01: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
d0643d266a Do not use fallthrough in switches 2019-11-19 16:10:18 +04:00
elsid
16170131b7
Add enum type for door state 2019-08-25 15:21:00 +02:00
elsid
ad05de44ae
Use 3d coordinates to detect stuck
To able water and flying creatures move to player going up or down.
2019-08-17 18:09:00 +02:00
elsid
7b94183d83
Revert "Take in account actor half extents for obstacle check"
This reverts commit 5434e92437.
2019-08-17 17:55:49 +02:00
elsid
5434e92437
Take in account actor half extents for obstacle check 2019-03-21 23:15:47 +03:00
elsid
1e8bf3846e
Remove unused argument 2019-03-21 23:15:47 +03:00
Andrei Kortunov
3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
elsid
f9c651bdf3
Add const 2018-10-13 22:16:23 +03:00
elsid
c9f3064cbd
Update ObstacleCheck once per frame 2018-10-13 22:16:22 +03:00
Andrei Kortunov
81b78a82e8 AI: try to open doors every AI_REACTION_TIME seconds (bug #4454) 2018-06-13 17:47:32 +04:00
Andrei Kortunov
10eb6ec75f AI: Check angle between actor and door 2017-07-31 19:28:02 +04:00
Andrei Kortunov
37952c9a79 Added door detection based by ray casting 2017-07-03 22:08:29 +04:00
mrcheko
612c7f1a2f Revert "Revert "Merge pull request #993 from mrcheko/pathfinding""
This reverts commit 3732979eec.
2016-08-19 22:15:26 +03:00
scrawl
3732979eec Revert "Merge pull request #993 from mrcheko/pathfinding"
This reverts commit 5190275b37, reversing
changes made to d7845012bf.
2016-08-14 18:04:33 +02:00
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
2016-07-09 22:59:54 +03:00
mrcheko
0793e4a80e refactor pathfinding code in AiWander: use AiPackage::pathTo, reuse AiPackage::ObstacleCheck 2016-07-05 21:38:41 +03:00
Austin Salgat
fc03216d48 Refactor to reuse existing obstacle detection 2016-04-16 12:14:00 -05:00
scrawl
a97eae864d Fix the ObstacleCheck time step (Fixes #3211) 2016-02-26 13:15:41 +01:00
scrawl
1875aa4a18 Restore getNearbyDoor 2015-12-07 03:53:46 +01:00
scrawl
0975f60d59 Stub out CellStore::get<T> accessors in preparation of reference movement between cells 2015-12-04 18:29:41 +01:00
scrawl
6405049add Rotations: move doors via Rotation rather than LocalRotation
Now LocalRotation is unneeded, will remove in next commit.
2015-11-12 00:58:29 +01:00
scrawl
3c338b9da9 ObstacleCheck: tweak the stuck detection parameters
The netch_betty wander animation starts up so slowly that the creature thought it was stuck, even though it's not.
2015-11-09 20:35:31 +01:00
scrawl
d233bc483d ObstacleCheck: fix evasion issue
The check if (samePosition... would not work as intended because actors do not move in every frame when the framerate is higher than the physics framerate. In that case the actor would change its evasion direction almost every frame.
2015-11-09 20:35:31 +01:00
scrawl
caa523a959 ObstacleCheck: fix the framerate not being taken into account 2015-11-09 20:35:31 +01:00
scrawl
801dc8eee3 ObstacleCheck: fix weird distance calculation 2015-11-09 20:17:21 +01:00
dteviot
60d0ad9283 When stuck, try moving backwards as well as to side. 2015-09-19 16:14:00 +12:00
dteviot
f2c9b9351f Try going right and left to "unstick" actor. 2015-08-30 10:06:09 +12:00
scrawl
278076e609 Include cleanup 2015-07-25 04:14:22 +02:00
scrawl
4bb3cbf0fb Remove last remains of Ogre 2015-06-03 23:04:35 +02:00
scrawl
b70383d127 Remove last remains of Ogre math 2015-06-03 21:37:21 +02:00
Rohit Nirmal
396fba7fa9 Silence -Wreorder warnings, and remove -Wno-reorder. 2015-05-21 22:46:44 -05:00
scrawl
f35c9b7a69 Clang warning fixes (thanks hemite) 2015-01-27 23:12:20 +01:00
scrawl
039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00
Thomas
7cd4c93fa4 Changed getNearbyDoor to use MWWorld::Ptr 2014-05-13 23:46:00 -04:00
Thomas
cbfa282f8d Changed implementations of aifollow/pursue/activate slightly, added ability for NPCs to go through unlocked doors (They even try locked ones), and step back from opening doors (Although it still needs some work)
Notes - When the door hits them while it's about to finish closing they will try to walk through the door.
      - Considerably more works is needed in making the NPC work out troublesome areas where they get stuck
2014-05-13 03:58:32 -04:00
cc9cii
e17fab891d Suppress travis warning and one more tweak. 2014-04-20 16:49:57 +10:00
cc9cii
479a94b35d Backing off closed doors working, needs cleanup and tweaking. 2014-04-20 08:14:54 +10:00
cc9cii
c652cb1568 More cleaning up. 2014-04-18 15:19:22 +10:00
cc9cii
d3be725ee7 Actors are moved on if idling near a closed interior door. Unreachable pathgrid points due to a closed door are removed from the allowed set of points. 2014-04-18 14:41:43 +10:00