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

64 commits

Author SHA1 Message Date
jvoisin
ee2446d5c4 Trim even more 2021-04-30 20:11:41 +02:00
elsid
675c0ab72f
Apply uniform random deviation to AI reaction timer
This allows to distribute AI reaction calls over time.

Before this change actors appearing at the same frame will react in the same
frame over and over because AI reaction period is constant. It creates a
non-uniform CPU usage over frames. If a single frame has too many AI reactions
it may cause stuttering when there are too many actors on a scene for current
system.

Another concern is a synchronization of actions between creatures and NPC.
They start to go or hit at the same frame that is unnatural.
2021-03-20 14:47:54 +01:00
elsid
8dba61f7ae
Use navmesh raycast to find reachable position around target 2021-02-14 04:14:22 +01:00
Bret Curtis
5a824d0333 components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues 2020-10-22 23:57:53 +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
8e0934cbd8
Single AI package clone definition 2020-05-20 20:15:29 +02:00
elsid
103188b61d
Derive all AI package classes from template to support CRTP features 2020-05-20 20:15:29 +02:00
elsid
f566ab03ab
Mark overriden AiPackage methods as final 2020-05-17 22:19:50 +02:00
Andrei Kortunov
e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Andrei Kortunov
15fa47827b AiCombat: Avoid jittering when aiming in melee 2018-08-16 16:56:42 +04:00
Andrei Kortunov
ee45f54b53 Refactor AiTemporaryStorage usage 2018-06-27 12:48:34 +04:00
Andrei Kortunov
fed10e87aa Store integer actor ID in AI packages (bug #4036) 2018-06-08 19:57:41 +04:00
Bret Curtis
d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
Allofich
e10c4d8814 Stop combat between AI when canFight is false 2016-12-26 22:42:42 +09:00
Allofich
a6dae51d87 Require line of sight for AI attacks (Fixes #3646) 2016-12-07 01:35:30 +09:00
MiroslavR
5e46121046 Implement fleeing AI (Closes #1118) 2016-11-16 20:15:25 +01: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
Allofich
b1be3596dc Cleanup of #include statements 2016-06-18 10:56:28 +09:00
scrawl
d3b76b7006 Don't stack Ai packages (Fixes #3101, Fixes #3080, Fixes #2697) 2016-02-02 22:20:56 +01:00
mrcheko
bcb1f4ed05 refactor AiCombat: remove all pathfinding code, adopt new version of
AiPackage::pathTo;
fix couple of warnings;
2016-01-03 15:33:52 +03:00
dteviot
0feae19140 AiCombat use evadeObstacles() from AiPackage. 2015-09-14 19:57:22 +12:00
dteviot
038851420d Removed unneeded temp variables.
Corrected case of function names.
2015-08-09 14:18:55 +12:00
dteviot
04aee1fe20 extracted function reactionTimeActions(). 2015-07-26 17:32:29 +12:00
dteviot
b3d5b47fea extracted function UpdateActorsMovement(). 2015-07-26 17:23:45 +12:00
scrawl
59db9664ba Pass the CharacterController to AiPackage::execute 2015-06-26 17:47:04 +02:00
scrawl
cad18969e3 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
	apps/openmw/mwmechanics/aitravel.cpp
2015-06-14 16:32:13 +02:00
dteviot
cb8ca2f03a Moved logic for building a Sync'ed path from AiCombat to PathFinding.
Is now used by AiFollow, which should fix "running in circles" bug caused when recalc a path and closest way point is the one NPC has just passed.
2015-06-11 18:31:35 +12:00
scrawl
4bb3cbf0fb Remove last remains of Ogre 2015-06-03 23:04:35 +02:00
terrorfisch
730abf6841 Moved all variables in temporary storage for AiCombat and some more for AiWander.
+Buxfix for previous AiWander changes
2014-10-10 00:16:17 +02:00
terrorfisch
4c36c67fb8 Updated AiCombat:
-moved everything except target to temporary storage
-removed the Pathfinder since present in baseclass
-cleaned some trigonometric mess
2014-10-08 23:00:36 +02:00
terrorfisch
0871d45790 Draft how to move temporary package state to CharacterController.
Example for a few values shown in AiWander.
2014-10-08 10:58:52 +02:00
scrawl
0fe9612afb Implement basic spellcasting AI (Fixes #961)
Select a weapon to attack with in AiCombat and equip it (Fixes #1609, Fixes #1772)
2014-08-28 00:55:37 +02:00
scrawl
523c2715e3 AiCombat: Handle Start to Min and Min to Max durations of 0 (found in Riekling animation) 2014-06-28 01:31:34 +02:00
scrawl
fe5bbfce3c Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
2014-06-13 19:31:33 +02:00
scrawl
a54ac579a5 Savegame: Store AiSequence 2014-06-13 02:26:52 +02:00
mrcheko
67abc60264 aiming to moving target in ranged combat ai
1) Taking into account target move vector and speed. However aiming is not
ideal, since attack strength can't be controlled directly. I did achieve
almost 100% accuracy updating it everyframe but then thought it would be
unfair, cause AI should mimic human targetting.
2) Also added in this commit func to measure real attack durations for
weapon.
2014-06-08 20:59:26 +04:00
mrcheko
aa5647b45e merge master, resolve conflicts 2014-05-17 19:20:57 +04:00
mrcheko
5be37f04ef Feature 1314: make npc fight creatures 2014-05-16 00:03:48 +04:00
scrawl
0bc33fa86a Revert "AiCombat: Removed obsolete door back-off code (now handled in AiAvoidDoor)"
Apparently not working for AiCombat due to its higher getPriority(). What should we do here?

This reverts commit a6e1d7ffd6.
2014-05-15 10:14:47 +02:00
scrawl
a6e1d7ffd6 AiCombat: Removed obsolete door back-off code (now handled in AiAvoidDoor) 2014-05-15 09:54:10 +02:00
scrawl
2e9985c1a3 Change all AI packages (except AiActivate) to use ActorIds
More robust in case the target changes cell or there are multiple targets with the same RefId
2014-05-15 09:54:10 +02:00
Thomas
10a5bb9464 Made code a bit more standardized and added a good bit of documentation. 2014-04-29 23:40:59 -04:00
mrcheko
22cdb166f2 warning fix, vars renaming 2014-04-27 22:38:04 +04:00
mrcheko
6a3dddfb9a merge master 2014-04-27 13:49:31 +04:00
mrcheko
f3626adc86 remake of z-moving in combat for flying/swimming enemies 2014-04-26 00:20:55 +04:00
mrcheko
f811abb752 pathgrid shortcutting extended 2014-04-20 20:35:07 +04:00
cc9cii
3dfd08cf2d Cleanup and little tweaking. 2014-04-20 08:31:02 +10:00