scrawl
9caff1d800
Don't say Idle voices when player is not in LOS ( Fixes #1436 )
2014-09-01 02:21:54 +02:00
scrawl
1bb82c710c
Fix use of uninitialized memory in AiWander::init
2014-08-14 18:55:54 +02:00
Michał Ściubidło
f754e06be9
Fix for bug 1685
2014-07-30 07:47:09 +01:00
Michał Ściubidło
bd3729a6cb
Add grace periods for player greeting.
...
Add delay for NPC greating. NPC ignores greeted player after some time.
Fixes bug 1503.
2014-07-28 23:45:26 +01:00
Michał Ściubidło
d47bfbe69c
Implement AI greeting states.
...
Greeting consist of 3 phases:
- none - default one, greeting state can only change to "in progress"
when near enough and some time passes
- in progress - NPC says his greating and rotates toward player,
state can only change to "done" after some time
- done - rotation is stoped, after idling can go away from player,
state can only change to "none" when player and NPC are faraway
2014-07-28 23:45:26 +01:00
Michał Ściubidło
20efeea5d9
AI tell their greatings even when player is moving (like morrowind).
...
Greating reset distance was greatly inflated comparing with morrowind.
2014-07-28 23:45:26 +01:00
scrawl
92f5898b32
AiWander: Make sure we have 8 idle values ( Fixes #1583 )
...
The AiWander instruction may specify more (or less) than 8.
2014-06-28 14:22:27 +02:00
scrawl
afbd5162ee
Move AiWander arrival check to time-critical section
2014-06-15 14:18:16 +02:00
scrawl
a54ac579a5
Savegame: Store AiSequence
2014-06-13 02:26:52 +02:00
Emanuel Guevel
1e4a854433
Remove static method MWWorld::Class::get(&Ptr)
...
It was just adding a level of indirection to Ptr.getClass().
All the call were replaced by that instead. The number of lines changed
is important, but the change itself is trivial, so everything should be
fine. :)
2014-05-22 20:50:00 +02:00
mrcheko
9e79fb5b87
fix to broken aiwander logic
2014-05-01 11:41:25 +04:00
mrcheko
e8f7d12c01
uninit bool and invalid iterator bugs fixes
2014-04-30 23:57:19 +04:00
scrawl
28ef236f0e
Don't allow setting a new return position if there already is one and we haven't reached it yet
2014-04-29 11:17:07 +02:00
scrawl
1fd7a07b5e
Merge branch 'master' of https://github.com/OpenMW/openmw into return
...
Conflicts:
apps/openmw/mwmechanics/aisequence.cpp
apps/openmw/mwmechanics/aiwander.cpp
2014-04-29 09:14:13 +02:00
scrawl
9b36a13821
Feature #1289 : NPCs return to default position
...
Make stationary NPCs return to their previous position once combat/crime AI finishes.
2014-04-29 09:09:51 +02:00
cc9cii
1fb2c8d87b
NPC turning is less hacky but still not perfect. NPC's should walk away after a period of non-action by the player (vanilla behaviour) - not yet implemented.
2014-04-27 07:38:31 +10:00
cc9cii
6a1435c49e
Remove rotation check that was freezing NPC's.
2014-04-20 17:59:08 +10:00
cc9cii
e17fab891d
Suppress travis warning and one more tweak.
2014-04-20 16:49:57 +10:00
cc9cii
2b544d550b
Fixed the rotation animation glitch.
2014-04-20 14:27:18 +10:00
cc9cii
000afa48b7
An attempt at making turning animation smoother. Copied some code from AiCombat for rotation.
2014-04-20 11:59:47 +10:00
cc9cii
3d26702f5e
Make idle actors face the player. Turning animation is not smooth.
2014-04-20 10:36:01 +10:00
cc9cii
9bd31b6236
Added reaction time and moved game setting variables init to the constructor.
2014-04-20 10:06:03 +10:00
cc9cii
479a94b35d
Backing off closed doors working, needs cleanup and tweaking.
2014-04-20 08:14:54 +10:00
cc9cii
a0fc514df7
Suppress compiler warning.
2014-04-18 15:45:39 +10:00
cc9cii
c652cb1568
More cleaning up.
2014-04-18 15:19:22 +10:00
cc9cii
2447f0f4aa
Cleaned up logging statements.
2014-04-18 14:41:44 +10:00
cc9cii
aad13d315c
Fixed issue where allowed nodes were being erased. PathFinder was returning an empty path if the closest pathgrid point to the start was also the closest pathgrid point to the goal. Still need to clean up and remove logging statements.
2014-04-18 14:41:44 +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
cc9cii
1ceeeb4a22
Fix movement glitches for actors with low speeds (e.g. a rat). Was caused by false detection of being stuck.
2014-04-18 14:41:43 +10:00
cc9cii
f597d3e88b
Use duration rather than frame counts. Stops false detection of being "stuck" with high frame rates (e.g. indoors).
2014-04-03 07:46:26 +11:00
cc9cii
07fd801d94
My previous analysis of the pathfinding issue was incorrect. It was in fact caused due to some of the pathgrid points being unreachable. Instead of returning an empty path in such a scenario, incorrect path + requested destination were being returned. There was also a defect where past cost was being used for selecting open points.
...
There is still an unresolved issue where mGraph and mSCComp are being rebuilt unnecessarily. The check mCell != cell in buildPath() is being triggered frequently. Not sure why.
2014-03-29 19:35:52 +11:00
cc9cii
90a813ad2c
Allow interrupting a walking NPC to trigger a greeting.
2014-03-29 19:35:52 +11:00
scrawl
c8c0e5de38
Fixed code issues found with unity build. Missing include guards, duplicated functions, ...
2014-03-16 23:49:06 +01:00
cc9cii
e6977d00e8
Oops. Fix typo picked up by Zini.
2014-03-15 08:16:35 +11:00
cc9cii
b2e3fa70c2
Fix spelling errors in comments.
2014-03-14 07:04:39 +11:00
cc9cii
d92740efc9
Bug #900 fix - only fixed AiWonder, AiCombat, AiTravel and others may need a different strategy to this.
2014-03-13 23:44:52 +11:00
Marc Zinnschlag
367919200f
moved CellRefList into a separate file
2014-02-23 20:11:05 +01:00
Marc Zinnschlag
7693f712bc
started making CellStore into a proper class; encapsulated mCell member
2014-02-21 11:35:46 +01:00
scrawl
52f89e9a17
Don't play "idle" voice entries for NPCs with Hello 0
...
Not entirely sure if this is correct, but it prevents the NPCs in the starting boat from incorrectly playing them.
2014-01-31 04:43:35 +01:00
scrawl
39d86a9468
Improvements to smooth NPC steering
2014-01-31 04:43:29 +01:00
scrawl
e717694b36
Reset Run stance in AiWander
2014-01-29 15:37:27 +01: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
gus
707e579dfe
Merge branch 'master' of https://github.com/zinnschlag/openmw.git into AIFix2
...
Conflicts:
apps/openmw/mwmechanics/aifollow.cpp
2014-01-24 19:16:50 +01:00
scrawl
05e75e1214
Closes #1127 : Fix for subtitles for idle dialogue appearing outside of hearing range
2014-01-19 20:54:05 +01:00
scrawl
bea161331c
Play 'hello' voiced dialogue entries in AIWander
2014-01-19 20:53:58 +01:00
scrawl
69ca03c308
Issue #777 : Move DrawState to CreatureStats. All creatures can cast spells, and some creatures have weapons.
2014-01-19 09:43:41 +01:00
scrawl
e410eb5273
Play 'Idle' voiced dialogue entries in AIWander. Tweak voice max distance.
2014-01-17 10:55:46 +01:00
scrawl
28a2585106
Unsheath weapon in AiWander
2014-01-15 14:53:29 +01:00
Marc Zinnschlag
3e58eb34e4
Merge remote-tracking branch 'sergeyshambir/startcombat'
...
Conflicts:
apps/openmw/mwscript/docs/vmformat.txt
2014-01-13 10:17:10 +01:00
gus
5d038423ec
attempt to solve Bug #1009 by not building graph every frame
2014-01-12 18:42:31 +01:00
scrawl
098f9712f1
Add getPlayerPtr() utility method. Reduces dependencies a lot.
2014-01-08 18:39:44 +01:00
Sergey Shambir
5c7e39a92f
Implemented script commands StartCombat, StopCombat, GetTarget.
...
Also renamed one field of AIWander class because it's not longer
unknown.
2014-01-07 04:43:06 +04:00
scrawl
b22dd40b41
Implement Paralyze magic effect
2014-01-03 17:06:05 +01:00
scrawl
eba068149d
Fix AIWander crash
2013-11-25 15:38:18 +01:00
gus
650a112e2e
better timer
2013-10-30 20:42:50 +01:00
Chris Robinson
9499ac4fd5
Increase the distance for reaching a path node
2013-08-29 17:41:20 -07:00
Chris Robinson
f9dbce685a
Avoid killing AIWander and AITravel when far away
...
This fixes the problem of certain NPCs not wandering because they
happened to spawn near a cell border away from the player, which
immediately "completed" the wander package.
AIWander can't cause NPCs to cross cell boundaries, so there's no risk
of them walking into an unloaded to. AITravel will now simply stop
moving, and resume later when the cell is loaded.
2013-08-29 17:41:20 -07:00
scrawl
982f743ddd
Fix wrong idle animations played
2013-08-03 13:13:33 +02:00
scrawl
7dc30a01cd
Some changes suggested by cppcheck
2013-07-31 18:46:32 +02:00
Torben Carrington
09beafd044
Pathfinding Overhaul - Master cleanup! Cleaned pathfinding entirely, all AI packages that are implemented as well, Increased buffer! This makes the intro guard no longer walk into you or go to far into the room (not tested against vanilla distances but it seems accurate enough until the next itteration of pathfinding fixes).
2013-05-31 17:49:52 -07:00
Torben Carrington
a4caec56cf
Pathfinding Overhaul - Fixed selecting cells that are inaccessable from AIWander and pathfinding in general (sadly requires minor effort on the AI Packages implementation but it is the quickest way I can see), minor cleanup again (there is a lot to cleanup, this will prolly be in every commit).
2013-05-31 17:01:42 -07:00
Torben Carrington
73a9671742
Pathfinding Overhaul - Changed the name of checkIfNextPointReached to a more intuitive name considering what it does (checkPathCompleted) and fixed a minor bug in it, modified buildPath() to take one final parameter, a bool which dictates whether or not to always use pathfinding (like AIWander should be doing) or to allow for "shortcuts", modified all ai packages to work with these two changes.
2013-05-29 20:05:17 -07:00
Torben Carrington
c080785235
Pathfinding Overhaul - Finished cleaning, removed unnecessary parameter in one function, fixed use of the function in ai packages and added use of clearPath() function in aiwander, fixed algorithms and got rid of excess subtractions in getDistance functions (thanks to Chris!).
2013-05-29 19:26:45 -07:00
Torben Carrington
dbbc96f600
AIWander Segmentation Fault Fix - Fixes the segmentation fault that used to occur when there was no pathgrid in the cell and a range was passed to AIWander.
2013-05-27 11:44:46 -07:00
Torben Carrington
ebc1fdd017
AIWander Patch - fixed another possibility of a bug occuring, best to fix it now then wait until it happens.
2013-05-27 09:05:42 -07:00
Torben Carrington
bd6d54cc8f
AIWander Minor Patch - Forgot an else statement and another check on an empty node vector, previously no nodes in range or only one would cause the AIWander to not do anything, now they will play idles correctly still.
2013-05-27 03:24:41 -07:00
Torben Carrington
fd96d47fe4
AIWander Completed. Replicates vanilla as best possible, pathfinding needs fixing before this looks correct but once the pathfinding files are edited this will behave pretty much exactly as vanilla. Major credit to Hrnchamd for major research.
2013-05-26 11:30:42 -07:00
Torben Carrington
96daad7a22
AIWander - shortened some if statements and made super minor optimizations to others, now using proper GMST to load proper idlechance instead of hacky set value."
2013-05-26 09:31:56 -07:00
Torben Carrington
e37324b967
AIWander everything works. only two things to do: Implement limiting selection on z axis, and correcting decision algorithm.
2013-05-26 08:49:44 -07:00
Torben Carrington
1cfe037d6b
AIWander - Added support for the Repeat parameter to mimic vanilla.
2013-05-24 04:49:20 -07:00
Chris Robinson
1d934e3112
Reduce some stdout spam
2013-04-06 04:46:28 -07:00
Marc Zinnschlag
a092deaee8
various fixes
2012-11-16 20:28:20 +01:00
marcin
51027c541e
Feature #391 Dummy AI package classes
2012-11-16 18:38:15 +01:00
marcin
bed0280ba1
Feature #391 Dummy AI package classes
2012-11-15 22:33:50 +01:00
marcin
4b939c7521
Feature #391 Dummy AI package classes
2012-11-15 22:15:20 +01:00
marcin
e6c8e1f0d7
Feature #391 Dummy AI package classes
2012-11-14 18:42:04 +01:00