Commit Graph

236 Commits (0.7.1-build-fixes)

Author SHA1 Message Date
dteviot 1ed6e95c07 Got rid of some radians to degrees to radians conversions. 10 years ago
mrcheko c773ed9f9a move checkWayIsClear to pathfinding; move shortcut logic to separate func (AiPackage::shortcutPath); rework AiPackage::pathTo 10 years ago
scrawl 6bcea21e14 Use fCombatDelayCreature, fCombatDelayNpc for random delays between aicombat attacks (Bug #1876) 10 years ago
scrawl a7bd050928 Accurate attack timings in AiCombat 10 years ago
scrawl 82740c1645 Remove completely broken code 10 years ago
scrawl d07b176b36 Take into account hit recovery, knockdown and other animations for AiCombat attack timing 10 years ago
scrawl 520a832a9a Remove an already resolved todo comment 10 years ago
scrawl a1432b0255 Move attackingOrSpell flag to the CharacterController 10 years ago
scrawl 59db9664ba Pass the CharacterController to AiPackage::execute 10 years ago
scrawl cad18969e3 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
	apps/openmw/mwmechanics/aitravel.cpp
10 years ago
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.
10 years ago
scrawl a0b0ae9bd1 Remove an unused variable 10 years ago
scrawl 4bb3cbf0fb Remove last remains of Ogre 10 years ago
scrawl 7bacb9418d Various math code ported to osg 10 years ago
scrawl 58ebf57154 Apply a comment that got lost in the endless depths of my git stash 10 years ago
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
10 years ago
Rohit Nirmal 396fba7fa9 Silence -Wreorder warnings, and remove -Wno-reorder. 10 years ago
scrawl ccab8cc9a1 Register Player in the PhysicsSystem 10 years ago
scrawl 8c810e3620 Move rng to components 10 years ago
scrawl 4e69e7cc0f OpenMW compiles and runs w/o render window 10 years ago
dteviot eb1090a1b6 Waypoint check only considers X & Y distance (Fixes #2423)
When pathfinder checks if actor has reached a waypoint, ignore actor's altitude.
10 years ago
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.
10 years ago
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
10 years ago
scrawl 81925645a3 Unreachable enemies combat AI fix (Fixes #2271) 10 years ago
scrawl f35c9b7a69 Clang warning fixes (thanks hemite) 10 years ago
dteviot 458b82c308 Centralized "fish can't attack non-swimmer" logic. 10 years ago
dteviot 7fe2f86d06 Slaughter fish attacks when player only knee deep in water (Fixes #2076) 10 years ago
scrawl a17252eab3 Remove unused checkWaypoint function
It was an almost exact copy of the checkPathCompleted function anyway.
10 years ago
scrawl a58bc9f2f7 Remove sneaking effect on combat AI (Fixes #2237) 10 years ago
Paulo Viadanna bfa048e687 Fix #1734: AI will stop combat if target disappear 10 years ago
terrorfisch 4eb1668467 references now initialized when they are needed 10 years ago
terrorfisch 730abf6841 Moved all variables in temporary storage for AiCombat and some more for AiWander.
+Buxfix for previous AiWander changes
10 years ago
terrorfisch 4c36c67fb8 Updated AiCombat:
-moved everything except target to temporary storage
-removed the Pathfinder since present in baseclass
-cleaned some trigonometric mess
10 years ago
terrorfisch 0871d45790 Draft how to move temporary package state to CharacterController.
Example for a few values shown in AiWander.
10 years ago
scrawl 07cd647e75 Fix broken AI for creatures with OnTarget spells (Bug #1927) 10 years ago
scrawl 233e221de2 Terminate AI packages when target is disabled or deleted (Fixes #1910) 10 years ago
scrawl 0f43592237 Another invalid iterator fix 11 years ago
scrawl f8f4d2dfdb Another invalid iterator fix 11 years ago
scrawl 1a98f8ca93 Invalid iterator fix 11 years ago
scrawl 0fe9612afb Implement basic spellcasting AI (Fixes #961)
Select a weapon to attack with in AiCombat and equip it (Fixes #1609, Fixes #1772)
11 years ago
scrawl 4773d754c6 Remove redundant isHostile flag (Fixes #1652) 11 years ago
scrawl d81e9cfefd Implement actors fighting for the actor they are following (Fixes #1141) 11 years ago
Lukasz Gromanowski 171c61022d Added initialization of weapRange in AiCombat::execute().
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
scrawl 523c2715e3 AiCombat: Handle Start to Min and Min to Max durations of 0 (found in Riekling animation) 11 years ago
scrawl 4f9ebd148c Fix broken AI movement on Z axis 11 years ago
Marc Zinnschlag 01c90a3434 Merge remote-tracking branch 'mrcheko/master' 11 years ago
scrawl 832f1a4857 Fix merge mistake 11 years ago
mrcheko c4e5872620 fix bug http://bugs.openmw.org/issues/1470 11 years ago
scrawl fe5bbfce3c Merge branch 'master' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
11 years ago
scrawl a54ac579a5 Savegame: Store AiSequence 11 years ago
mrcheko df7213185f warning fixes 11 years ago
mrcheko d6d9df6cec split getStartTime 11 years ago
mrcheko 979128b2c5 Combat music; some minor combat fixes 11 years ago
mrcheko 08e8dab067 merge openmw master 11 years ago
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.
11 years ago
Marc Zinnschlag 4aab4bae65 minor cleanup and silenced a warning 11 years ago
Marc Zinnschlag f0d0a31a19 Merge remote-tracking branch 'mrcheko/master' 11 years ago
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
11 years ago
scrawl 039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
11 years ago
mrcheko c62187bd55 fix bug at http://bugs.openmw.org/issues/1155
Though it still can happen sometimes but not in such stupid manner.
11 years ago
mrcheko aa5647b45e merge master, resolve conflicts 11 years ago
mrcheko 5be37f04ef Feature 1314: make npc fight creatures 11 years ago
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.
11 years ago
scrawl a6e1d7ffd6 AiCombat: Removed obsolete door back-off code (now handled in AiAvoidDoor) 11 years ago
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
11 years ago
Marc Zinnschlag 2009cf9ad7 Merge remote-tracking branch 'scrawl/master' into openmw-30 11 years ago
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.
11 years ago
cc9cii cf23721f1b Windows debug build crash fix. 11 years ago
mrcheko e8f7d12c01 uninit bool and invalid iterator bugs fixes 11 years ago
mrcheko 35c1724d39 unblock vertical aiming for combatants 11 years ago
mrcheko 22cdb166f2 warning fix, vars renaming 11 years ago
mrcheko 82121e0401 some checks reworked 11 years ago
mrcheko 6a3dddfb9a merge master 11 years ago
mrcheko dbe1307de0 code refining + minor fixes 11 years ago
mrcheko f3626adc86 remake of z-moving in combat for flying/swimming enemies 11 years ago
mrcheko fbd0ffe86f enable z-moving for flying/water combatants 11 years ago
mrcheko f811abb752 pathgrid shortcutting extended 11 years ago
cc9cii 3dfd08cf2d Cleanup and little tweaking. 11 years ago
cc9cii 479a94b35d Backing off closed doors working, needs cleanup and tweaking. 11 years ago
Marc Zinnschlag f9d2fde783 Merge branch 'openmw-29'
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
11 years ago
cc9cii 85c467f00f Minor cleanup for aicombat pathfinding workaround. 11 years ago
Marc Zinnschlag 367919200f moved CellRefList into a separate file 11 years ago
cc9cii 1bd2664cb0 aicombat pathfinding workaround 11 years ago
Marc Zinnschlag 7693f712bc started making CellStore into a proper class; encapsulated mCell member 11 years ago
scrawl d25b3ad9cb Fix AiCombat for creatures with weapons 11 years ago
scrawl 5ee105c812 Fix typo 11 years ago
scrawl 067c2bc2ec Disable combat movements for creatures without weapons 11 years ago
scrawl 39d86a9468 Improvements to smooth NPC steering 11 years ago
mrcheko 3a5da7e6e8 merged with master 11 years ago
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
11 years ago
mrcheko fe0268062d merge with master 11 years ago
mrcheko 45b3aa3d93 corrected things connected to determining attack type 11 years ago
scrawl b1066de81d Revert "Merge remote-tracking branch 'mrcheko/master'"
This reverts commit 4e360136b1, reversing
changes made to 047bbe43b2.

Conflicts:

	apps/openmw/mwmechanics/aicombat.cpp
11 years ago
scrawl a1fbd1fcc8 Revert "Merge remote-tracking branch 'mrcheko/master'"
This reverts commit df7c139e2f, reversing
changes made to fec26342cd.
11 years ago
gus 707e579dfe Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AIFix2
Conflicts:
	apps/openmw/mwmechanics/aifollow.cpp
11 years ago
gus 5ca5946760 WIP 11 years ago
mrcheko 87e83a92f8 refactoring of setting an attack type 11 years ago
scrawl ea21d8fec3 Fix CreatureTargetted function 11 years ago
scrawl c8a9e9f7fa Stop AiCombat when the target is dead 11 years ago
scrawl df7c139e2f Merge remote-tracking branch 'mrcheko/master' 11 years ago
mrcheko 339399f8b1 bug fix/logic fix/future suggestion 11 years ago
scrawl 9723263730 Bug #1126: Tweak creature attack distance a bit (still no idea where this should come from) 11 years ago
scrawl 4e360136b1 Merge remote-tracking branch 'mrcheko/master'
Conflicts:
	apps/openmw/mwmechanics/aicombat.cpp
	apps/openmw/mwmechanics/character.cpp
	apps/openmw/mwmechanics/character.hpp
11 years ago
scrawl 13646a651b Issue #777: Handle creatures with weapons in CharacterController. Move attack strength to CreatureStats. 11 years ago
mrcheko df4df5b094 fixed weapRange for creatures/startcombat script(?) 11 years ago
mrcheko 435bbdd530 one more mismatch fixed 11 years ago
mrcheko 46a4790cb1 final warnings removal 11 years ago
mrcheko 7df8273d71 fix for everybody 11 years ago
mrcheko 5357f569e6 fix for scrawl 11 years ago
mrcheko f2ad1c18f2 fix merging problem/some logic fixes 11 years ago
mrcheko d5f794d4fb update to combat ai behaviour 11 years ago
scrawl da3295d69c Closes #1106: Move stance to CreatureStats, since creatures also have separate run/walk animations. 11 years ago
Marc Zinnschlag 3e58eb34e4 Merge remote-tracking branch 'sergeyshambir/startcombat'
Conflicts:
	apps/openmw/mwscript/docs/vmformat.txt
11 years ago
gus 5d4e148063 some clean up 11 years ago
gus 5d038423ec attempt to solve Bug #1009 by not building graph every frame 11 years ago
gus 2d66b2c4fa AiFollow. Npc get stuck often (no stuck dtection yet) 11 years ago
gus f41f08c352 Wrong logic... should improve performances 11 years ago
scrawl 621e52f09d Play "attack" voiced dialogue entries randomly based on iVoiceAttackOdds. 11 years ago
scrawl 098f9712f1 Add getPlayerPtr() utility method. Reduces dependencies a lot. 11 years ago
scrawl 90b55c8d4b Use Ogre's asin/acos functions which will protect against NaNs 11 years ago
Sergey Shambir 5c7e39a92f Implemented script commands StartCombat, StopCombat, GetTarget.
Also renamed one field of AIWander class because it's not longer
unknown.
11 years ago
scrawl b22dd40b41 Implement Paralyze magic effect 11 years ago
gus 4559e932ae AI packages have priority and combat is triggered in actor.cpp using the Hostile setting in CreaturesState 11 years ago
gus 683b8d77dd build fix (thanks travis) 11 years ago
gus 02ded18fc5 Linux backslash fix 11 years ago
gus 2a927f65d3 perfomances optimisations (pathfinding is computed less often, max 4 times per sec) 11 years ago
gus 650a112e2e better timer 11 years ago
gus 0e86209224 linux fix :p 11 years ago
gus b7a9243173 fighting should stop when the target is dead 11 years ago
gus 12d8b4e0f8 bugfix 11 years ago
gus 2d84f7d33d NPC run 11 years ago
gus 968968502e NPC always face you when fighting 11 years ago
gus 1ac3d99c78 pathfinding now works in AICombat. 11 years ago
gus 83a375b55d AI now continue to hit you.
TODO: change the way time is handled
11 years ago
gus 2537384c50 bug fix 11 years ago
gus 9353f4d14f WIP AI combat 11 years ago