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

195 commits

Author SHA1 Message Date
dteviot
58f732ebc9 Update path following checks each frame in AiCombat. 2015-08-04 18:20:05 +12:00
dteviot
ad9bab0b68 Removed redundant if. 2015-08-04 18:17:08 +12:00
dteviot
4256e151b1 Fixed error in deciding type of attack 2015-08-04 18:15:58 +12:00
Marc Zinnschlag
26ea3aa1ad Merge remote-tracking branch 'dteviot/refactoringAiWander' 2015-07-30 10:26:40 +02: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
dteviot
aba7225817 Removed some duplicated operations. 2015-07-26 11:15:21 +12:00
scrawl
b3f5ac5dbb Include cleanup 2015-07-25 02:11:49 +02:00
scrawl
e6b28d84f0 Outdated comment fix 2015-07-25 00:28:47 +02:00
dteviot
1ed6e95c07 Got rid of some radians to degrees to radians conversions. 2015-07-19 18:01:25 +12:00
mrcheko
c773ed9f9a move checkWayIsClear to pathfinding; move shortcut logic to separate func (AiPackage::shortcutPath); rework AiPackage::pathTo 2015-07-04 18:00:16 +03:00
scrawl
6bcea21e14 Use fCombatDelayCreature, fCombatDelayNpc for random delays between aicombat attacks (Bug #1876) 2015-07-04 05:19:05 +02:00
scrawl
a7bd050928 Accurate attack timings in AiCombat 2015-07-03 05:58:12 +02:00
scrawl
82740c1645 Remove completely broken code 2015-07-03 02:29:42 +02:00
scrawl
d07b176b36 Take into account hit recovery, knockdown and other animations for AiCombat attack timing 2015-07-03 02:18:35 +02:00
scrawl
520a832a9a Remove an already resolved todo comment 2015-07-02 22:24:23 +02:00
scrawl
a1432b0255 Move attackingOrSpell flag to the CharacterController 2015-07-02 19:14:28 +02: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
a0b0ae9bd1 Remove an unused variable 2015-06-04 21:51:24 +02:00
scrawl
4bb3cbf0fb Remove last remains of Ogre 2015-06-03 23:04:35 +02:00
scrawl
7bacb9418d Various math code ported to osg 2015-06-03 19:41:19 +02:00
scrawl
58ebf57154 Apply a comment that got lost in the endless depths of my git stash 2015-06-02 17:13:30 +02:00
scrawl
22f01b1232 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/launcher/graphicspage.cpp
	apps/opencs/editor.cpp
	apps/opencs/model/doc/document.cpp
	apps/opencs/view/render/cell.cpp
	apps/opencs/view/render/mousestate.cpp
	apps/opencs/view/render/textoverlay.cpp
	apps/opencs/view/render/worldspacewidget.cpp
	apps/openmw/mwclass/creature.cpp
	apps/openmw/mwclass/npc.cpp
	apps/openmw/mwgui/inventorywindow.cpp
	apps/openmw/mwgui/loadingscreen.cpp
	apps/openmw/mwgui/mapwindow.cpp
	apps/openmw/mwgui/pickpocketitemmodel.cpp
	apps/openmw/mwgui/waitdialog.cpp
	apps/openmw/mwmechanics/combat.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwrender/globalmap.cpp
	apps/openmw/mwworld/physicssystem.cpp
	apps/openmw/mwworld/refdata.cpp
	apps/openmw/mwworld/scene.cpp
	apps/openmw/mwworld/worldimp.cpp
	components/sdlutil/sdlinputwrapper.cpp
	extern/shiny/Main/Factory.cpp
	extern/shiny/Main/MaterialInstance.cpp
	extern/shiny/Main/Platform.cpp
	extern/shiny/Main/ShaderSet.cpp
2015-05-23 20:33:44 +02:00
Rohit Nirmal
396fba7fa9 Silence -Wreorder warnings, and remove -Wno-reorder. 2015-05-21 22:46:44 -05:00
scrawl
ccab8cc9a1 Register Player in the PhysicsSystem 2015-05-12 17:40:42 +02:00
scrawl
8c810e3620 Move rng to components 2015-04-22 17:58:55 +02:00
scrawl
4e69e7cc0f OpenMW compiles and runs w/o render window 2015-04-01 17:02:15 +02:00
dteviot
eb1090a1b6 Waypoint check only considers X & Y distance (Fixes #2423)
When pathfinder checks if actor has reached a waypoint, ignore actor's altitude.
2015-03-23 20:09:46 +13:00
dteviot
3f28634d1f consolidate random number logic
Note, I suspect Rng::rollClosedProbability() is not needed.  The only difference between it and rollProbability() is that one time in 37k (on Windows), it will give an output of 1.0.
On some versions of Linux, the value of 1.0 will occur about 1 time in 4 billion.
2015-03-15 14:07:47 +13:00
dteviot
ca8c8c6aa4 fixing MSVC 2013 warning C4244: & C4305
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
2015-03-08 17:42:07 +13:00
scrawl
81925645a3 Unreachable enemies combat AI fix (Fixes #2271) 2015-02-14 16:51:54 +01:00
scrawl
f35c9b7a69 Clang warning fixes (thanks hemite) 2015-01-27 23:12:20 +01:00
dteviot
458b82c308 Centralized "fish can't attack non-swimmer" logic. 2015-01-11 14:25:46 +13:00
dteviot
7fe2f86d06 Slaughter fish attacks when player only knee deep in water (Fixes #2076) 2015-01-09 21:40:53 +13:00
scrawl
a17252eab3 Remove unused checkWaypoint function
It was an almost exact copy of the checkPathCompleted function anyway.
2015-01-07 02:34:28 +01:00
scrawl
a58bc9f2f7 Remove sneaking effect on combat AI (Fixes #2237) 2014-12-28 14:45:20 +01:00
Paulo Viadanna
bfa048e687 Fix #1734: AI will stop combat if target disappear 2014-12-02 17:38:25 -02:00
terrorfisch
4eb1668467 references now initialized when they are needed 2014-10-10 23:32:15 +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
07cd647e75 Fix broken AI for creatures with OnTarget spells (Bug #1927) 2014-09-18 03:19:13 +02:00
scrawl
233e221de2 Terminate AI packages when target is disabled or deleted (Fixes #1910) 2014-09-14 10:49:33 +02:00
scrawl
0f43592237 Another invalid iterator fix 2014-08-28 16:47:54 +02:00
scrawl
f8f4d2dfdb Another invalid iterator fix 2014-08-28 02:14:30 +02:00
scrawl
1a98f8ca93 Invalid iterator fix 2014-08-28 02:09:00 +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
4773d754c6 Remove redundant isHostile flag (Fixes #1652) 2014-07-28 16:41:12 +02:00
scrawl
d81e9cfefd Implement actors fighting for the actor they are following (Fixes #1141) 2014-07-27 20:33:45 +02:00
Lukasz Gromanowski
171c61022d Added initialization of weapRange in AiCombat::execute().
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2014-07-21 21:17:12 +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
4f9ebd148c Fix broken AI movement on Z axis 2014-06-17 15:25:54 +02:00
Marc Zinnschlag
01c90a3434 Merge remote-tracking branch 'mrcheko/master' 2014-06-15 14:12:38 +02:00
scrawl
832f1a4857 Fix merge mistake 2014-06-14 02:31:01 +02:00
mrcheko
c4e5872620 fix bug http://bugs.openmw.org/issues/1470 2014-06-13 23:22:00 +04: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
df7213185f warning fixes 2014-06-12 23:42:33 +04:00
mrcheko
d6d9df6cec split getStartTime 2014-06-11 00:20:46 +04:00
mrcheko
979128b2c5 Combat music; some minor combat fixes 2014-06-10 14:20:29 +04:00
mrcheko
08e8dab067 merge openmw master 2014-06-09 22:37:49 +04: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
Marc Zinnschlag
4aab4bae65 minor cleanup and silenced a warning 2014-05-26 10:14:24 +02:00
Marc Zinnschlag
f0d0a31a19 Merge remote-tracking branch 'mrcheko/master' 2014-05-26 10:08:40 +02:00
mrcheko
8fa7fcdbee fix bug http://bugs.openmw.org/issues/1335 (1304 as well)
though fish detects if actor is swimming, but in MW it attacks even if
the player is knee-deep in water
2014-05-25 21:03:37 +04:00
scrawl
039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00
mrcheko
c62187bd55 fix bug at http://bugs.openmw.org/issues/1155
Though it still can happen sometimes but not in such stupid manner.
2014-05-25 13:31:46 +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
Marc Zinnschlag
2009cf9ad7 Merge remote-tracking branch 'scrawl/master' into openmw-30 2014-05-10 10:48:40 +02:00
scrawl
1444cd9051 Fix AiCombat exception when actor has a lockpick/probe equipped.
Don't make NPCs autoEquip lockpicks/probes, since they can't use them.
2014-05-10 00:37:36 +02:00
cc9cii
cf23721f1b Windows debug build crash fix. 2014-05-09 20:43:24 +10:00
mrcheko
e8f7d12c01 uninit bool and invalid iterator bugs fixes 2014-04-30 23:57:19 +04:00
mrcheko
35c1724d39 unblock vertical aiming for combatants 2014-04-28 16:34:49 +04:00
mrcheko
22cdb166f2 warning fix, vars renaming 2014-04-27 22:38:04 +04:00
mrcheko
82121e0401 some checks reworked 2014-04-27 16:59:21 +04:00
mrcheko
6a3dddfb9a merge master 2014-04-27 13:49:31 +04:00
mrcheko
dbe1307de0 code refining + minor fixes 2014-04-26 22:21:20 +04:00
mrcheko
f3626adc86 remake of z-moving in combat for flying/swimming enemies 2014-04-26 00:20:55 +04:00
mrcheko
fbd0ffe86f enable z-moving for flying/water combatants 2014-04-22 22:59:39 +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
cc9cii
479a94b35d Backing off closed doors working, needs cleanup and tweaking. 2014-04-20 08:14:54 +10:00
Marc Zinnschlag
f9d2fde783 Merge branch 'openmw-29'
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
2014-03-04 09:34:38 +01:00
cc9cii
85c467f00f Minor cleanup for aicombat pathfinding workaround. 2014-02-25 08:30:52 +01:00
Marc Zinnschlag
367919200f moved CellRefList into a separate file 2014-02-23 20:11:05 +01:00
cc9cii
1bd2664cb0 aicombat pathfinding workaround 2014-02-23 11:47:25 +01:00
Marc Zinnschlag
7693f712bc started making CellStore into a proper class; encapsulated mCell member 2014-02-21 11:35:46 +01:00
scrawl
d25b3ad9cb Fix AiCombat for creatures with weapons 2014-02-19 11:23:03 +01:00
scrawl
5ee105c812 Fix typo 2014-02-05 05:18:10 +01:00
scrawl
067c2bc2ec Disable combat movements for creatures without weapons 2014-01-31 04:43:35 +01:00
scrawl
39d86a9468 Improvements to smooth NPC steering 2014-01-31 04:43:29 +01:00
mrcheko
3a5da7e6e8 merged with master 2014-01-29 00:03:00 +02:00
Marc Zinnschlag
fd5486864a Merge remote-tracking branch 'gus/AIFix2'
Conflicts:
	apps/openmw/mwbase/mechanicsmanager.hpp
	apps/openmw/mwmechanics/actors.cpp
	apps/openmw/mwmechanics/actors.hpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
2014-01-28 12:33:31 +01:00
mrcheko
fe0268062d merge with master 2014-01-27 22:38:01 +02:00