scrawl
f09c8ddc9e
Remove a pointless assert
2014-05-23 16:44:51 +02:00
scrawl
b47b2b84f3
Merge branch 'master' of https://github.com/OpenMW/openmw
...
Conflicts:
apps/openmw/mwdialogue/filter.cpp
apps/openmw/mwgui/waitdialog.cpp
2014-05-23 08:39:48 +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
scrawl
4b5f02f644
Remove useless throwing of exception
2014-05-22 15:29:36 +02:00
scrawl
3380e1e1c5
Fix ShouldAttack filter
...
This makes NPCs exit dialogue properly when they should attack as a result of taunting actions.
2014-05-22 12:20:25 +02:00
Marc Zinnschlag
58afa58549
Merge remote-tracking branch 'mrcheko/master'
2014-05-19 22:07:32 +02:00
mrcheko
638df221a6
memory leak fix
2014-05-19 23:29:35 +04:00
Marc Zinnschlag
37f1a49352
Merge remote-tracking branch 'mrcheko/master'
2014-05-18 22:36:40 +02:00
mrcheko
fa14df62b7
fix crash on disappeared target
2014-05-18 23:15:22 +04:00
Marc Zinnschlag
56c4367c1a
Merge remote-tracking branch 'mrcheko/master'
2014-05-18 18:42:23 +02:00
mrcheko
e1249f6a31
actor handle and id confusing fix
2014-05-18 20:13:46 +04:00
mrcheko
66307dd889
travis fix #3 :(
2014-05-18 16:10:14 +04:00
mrcheko
74697f8116
travis fix #2
2014-05-18 15:41:15 +04:00
scrawl
5b76c0893a
Merge branch 'master' of https://github.com/OpenMW/openmw
...
Conflicts:
components/esm/inventorystate.hpp
2014-05-18 12:55:43 +02:00
mrcheko
69c1eb28c5
travis compile fix
2014-05-18 14:39:04 +04:00
mrcheko
aa5647b45e
merge master, resolve conflicts
2014-05-17 19:20:57 +04:00
scrawl
b4ed828e21
Feature #1323 : Implement restocking items (does not handle levelled lists yet)
2014-05-17 14:30:31 +02:00
Marc Zinnschlag
f7c89015f9
Merge remote-tracking branch 'scrawl/master'
2014-05-17 11:50:31 +02:00
scrawl
92c5bb56e0
Un-reverted actorId for AiPursue
2014-05-17 05:34:54 +02:00
scrawl
e266aff561
Savegame: store projectiles
2014-05-17 05:24:32 +02:00
scrawl
e5a21aca53
Refactor projectiles to no longer use MW-objects
2014-05-16 13:33:30 +02:00
scrawl
18852c09d0
Manually re-added AiCombat portion of actorid changes. This is the only one that really matters, and will not suffer from the infinite recursion because it's not included in AiSequence::fill.
2014-05-16 12:28:23 +02:00
scrawl
36d9ae17cc
Revert "Change all AI packages (except AiActivate) to use ActorIds"
...
Causes potential infinite loops (AiSequence::fill -> AiPackage() -> getCreatureStats -> ensureCustomData -> ..)
This reverts commit 2e9985c1a3
.
2014-05-16 12:11:34 +02:00
mrcheko
5be37f04ef
Feature 1314: make npc fight creatures
2014-05-16 00:03:48 +04:00
Marc Zinnschlag
3b2ba4f6cd
Merge remote-tracking branch 'scrawl/master'
2014-05-15 14:25:36 +02: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
b16d444f0f
Fix never clearing graveyard. Oops
2014-05-15 10:05:35 +02:00
scrawl
b6a7aee42e
Fix player not being allowed to use his own items
2014-05-15 09:54:10 +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
scrawl
2f13a17a39
Add some more safety checks to spellcasting
2014-05-15 09:54:10 +02:00
scrawl
a609dc5674
Fix exception when getting hit by a trap
2014-05-15 09:54:10 +02:00
scrawl
a76e391ad0
Savegame: store door movement state ( Closes #747 )
2014-05-15 09:54:10 +02:00
scrawl
37b9d2fb0c
Fix a wrong use of reference that causes potential crash
2014-05-15 09:54:10 +02:00
Marc Zinnschlag
d08869a25d
Merge remote-tracking branch 'slothlife/msvc_warning_cleanup'
...
Conflicts:
apps/openmw/mwrender/localmap.cpp
2014-05-15 08:13:15 +02:00
slothlife
f33559fead
Fixes for MSVC warnings, less overall changes
...
Kept some fixes from the first round of review. Found out that several
targets weren't being built with the same basic warnings disabled.
Disabled a few warnings for external libraries specifically, rather than
applying them to all targets.
2014-05-14 20:12:52 -05:00
scrawl
9b67fcc4d7
Merge branch 'master' of https://github.com/OpenMW/openmw
2014-05-14 23:54:25 +02:00
scrawl
9052cc4a57
Savegame: store ActiveSpells
2014-05-14 23:54:15 +02:00
Thomas
d2aada95b4
Fixed AiPursue by fixing underlying issue is Pathto()
2014-05-14 14:11:34 -04:00
Thomas
2425d2c2ab
Added stuck mitigation for AiAvoidDoor
2014-05-14 13:38:10 -04:00
Thomas
993ef1be43
Actor avoiding door asks all surrounding actors to do the same.
2014-05-14 04:05:18 -04:00
scrawl
61187c2fef
Savegame: store actorIds
2014-05-14 09:47:49 +02:00
Thomas
cbcf0f6039
Changed AiEScort to use new PathTo function
2014-05-14 01:44:11 -04:00
scrawl
dfacf8c044
Change ActiveSpells to use ActorId
2014-05-14 07:14:08 +02:00
slothlife
c160a04ede
Revert "Fixes for warnings when building with MSVC"
...
This reverts commit 46eb20b98c
.
2014-05-14 00:03:30 -05:00
scrawl
7697ab37e0
Fixes #1129 : Change summoned creatures to use ActorId
...
Gracefully handles summoned creatures that are left behind in inactive cells.
2014-05-14 06:37:31 +02:00
Thomas
7cd4c93fa4
Changed getNearbyDoor to use MWWorld::Ptr
2014-05-13 23:46:00 -04:00
scrawl
99b4bc721b
Don't attempt to inflict spells on dead actors
2014-05-14 05:37:53 +02:00
scrawl
6c7b3074f5
Fix self-defense for creatures when attacked with a spell
2014-05-14 05:31:19 +02:00
Thomas
58bf7624be
Made code a bit more efficient
2014-05-13 21:52:05 -04:00
scrawl
3cdbcf3c28
Merge branch 'actorid' of https://github.com/OpenMW/openmw
...
Conflicts:
apps/openmw/mwmechanics/creaturestats.cpp
2014-05-14 02:35:05 +02:00
Thomas
203ef580cf
Fixed moving activatable object being incorrectly activated.
2014-05-13 20:32:29 -04:00
scrawl
365ca6c7e1
Fixes #1331 : Manually disable movement state for dead actors.
...
For dead actors, refreshCurrentAnims is no longer called, so we need to disable the movement state manually.
2014-05-13 21:47:45 +02:00
Thomas
6d540c4e07
Removed merging error
2014-05-13 14:24:48 -04:00
Thomas
680890c846
Clarification on some documentation points
2014-05-13 14:21:59 -04:00
Thomas
d6d4d9f75d
Removed destructor documentation
2014-05-13 14:08:08 -04:00
Thomas
ee36ace00b
Undid some code clean up changes, and changed how some includes work
2014-05-13 13:43:50 -04:00
Thomas
598221a8e7
Forgot some files
2014-05-13 13:07:27 -04:00
scrawl
e591d23880
Fixes #894 : Make sure the player's CharacterController is updated when the player is rebuilt. Necessary if the race is changed while we are still in a GUI (e.g. in the review dialog), and an update normally wouldn't occur.
2014-05-13 19:01:02 +02:00
Thomas
9dbe53c722
Merge remote-tracking branch 'upstream/master'
2014-05-13 04:11:07 -04:00
Thomas
2db3c89a9e
Ensures destination is far enough to care about getting stuck
2014-05-13 04:09:21 -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
Thomas
2c74ea381e
Moved pathfinding code to aiPackage, implemented it's use with aiFollow and aiPursue
2014-05-12 21:05:32 -04:00
scrawl
386604bc9d
Fixes #869 : Added methods to control external and internal collision modes separately
...
When an actor dies, we should only disable external collisions, i.e. prevent other actors from colliding with the dead body. The dead actor, however, should still have gravity and collision applied.
Also moved disableCollision to when the death animation finishes, not as soon as the actor's health is 0.
2014-05-13 01:43:52 +02:00
mrcheko
725f6cac5e
AiPursue infinite package updating bug resolved
2014-05-13 00:05:30 +04:00
scrawl
6cc691115b
Savegame: store most of CreatureStats
2014-05-12 21:37:36 +02:00
Thomas
645d174a96
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
apps/openmw/mwmechanics/aisequence.hpp
2014-05-12 14:49:08 -04:00
mrcheko
e4fe78937a
Merge remote-tracking branch 'upstream/master'
2014-05-12 22:06:26 +04:00
scrawl
b0fbea9d57
Removed a wrong assertion. Max drowning time is defined by GMST.
2014-05-11 21:03:27 +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
scrawl
731bc9c275
Fix broken isClass check and renamed variable for clarity
2014-05-09 18:45:49 +02:00
slothlife
46eb20b98c
Fixes for warnings when building with MSVC
...
Most warnings are innocuous (wrong type-specifier for forward
declarations, conversion of literals into unsigned integers, warnings
about methods optimized out), but I believe actual bugs were revealed in
vartypedelegate.cpp and combat.cpp.
2014-05-09 08:32:52 -05:00
cc9cii
cf23721f1b
Windows debug build crash fix.
2014-05-09 20:43:24 +10:00
mrcheko
01810f24b0
A* misses 1st closest node fix
2014-05-06 23:29:39 +04:00
Marc Zinnschlag
729e079b0b
Merge remote-tracking branch 'scrawl/master'
2014-05-06 20:18:19 +02:00
scrawl
1c8c26072d
Crime and self defense fixes
...
- NPCs should still shout messages such as "thief" even if they did not report the crime
- Fixed self defense for NPCs (they no longer attack the player when they were attacked by a non-player actor)
- Fixed self defense for creatures (Fixes #1203 )
2014-05-06 19:15:43 +02:00
scrawl
d2beb814e7
Remove superfluous attack phrases (already done by startCombat)
2014-05-06 18:05:53 +02:00
scrawl
dd9117809d
Say an attack phrase when combat starts
...
Move combat start to a helper method
Added some todo comments
2014-05-06 00:13:31 +02:00
Jeffrey Haines
d4812c3af9
fixed placement of else statement
2014-05-04 17:54:33 -04:00
Jeffrey Haines
78f76842a6
Added else statement
...
Its still dodgy though
2014-05-04 16:56:30 -04:00
Jeffrey Haines
7d5dab214c
#58 - Sneak Skill: functional sneaking
...
Removed sneak checking from individual actor update.
Added sneak checking to Actors::update()
2014-05-04 16:20:09 -04:00
Jeffrey Haines
a65e8393bb
Merged files
2014-05-04 11:33:27 -04:00
mrcheko
f596b698d9
fixes to slow-down at jump startup and infinite air intertia growth
2014-05-04 18:15:07 +04:00
Jeffrey Haines
a469444e53
Player can't detect self
2014-05-04 08:05:32 -04:00
Thomas
dbf06d8c8b
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
apps/openmw/mwmechanics/aipursue.hpp
apps/openmw/mwmechanics/aisequence.hpp
2014-05-04 02:06:43 -04:00
Jeffrey Haines
e1e23447f2
Removed initial check form setSneak
...
It wasn’t needed.
2014-05-03 13:16:07 -04:00
Jeffrey Haines
05e326bdc3
Added update sneak to actors
...
Intends to check the state of a players sneak by asking the question if
each npc can see the player.
2014-05-03 12:48:07 -04:00
scrawl
658c37a299
AiPursue: If we reached the path end, that does not mean we reached the target. Rebuild the path if the target has moved in the meantime.
...
Fixes guards in pursuit activating the dialogue too early.
Also tweaked the activation distance.
2014-05-03 17:17:00 +02:00
scrawl
7bddfc0025
Fix some spelling mistakes.
2014-05-03 12:23:22 +02:00
scrawl
122e606e30
Crime: improvement to arrest on sight for large bounties
...
iCrimeThreshold controls the needed bounty to have guards run to the player and force dialogue. In vanilla, the greeting dialogue is scripted to either arrest the player (< 5000 bounty) or present a death sentence and attack (>= 5000 bounty).
2014-05-03 12:17:44 +02:00
scrawl
fc7e79027a
Fixes #1144 : Don't refreshCurrentAnims when adding already dead actors
2014-05-01 16:55:16 +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
Jeffrey Haines
14ebd8b110
Fixed logic in commit crime
2014-04-30 07:44:29 -04:00
Thomas
10a5bb9464
Made code a bit more standardized and added a good bit of documentation.
2014-04-29 23:40:59 -04:00
Marc Zinnschlag
0c2843b0f7
some missing cleanup
2014-04-29 19:56:33 +02:00
Marc Zinnschlag
f6a876bc3d
added actor ID
2014-04-29 15:27:49 +02:00
Marc Zinnschlag
4eeed4e2c7
Merge remote-tracking branch 'scrawl/return'
2014-04-29 12:27:27 +02: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
Marc Zinnschlag
8fea2cfa2a
Merge remote-tracking branch 'mrcheko/master'
2014-04-29 10:03:29 +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
Thomas
885228ec02
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
apps/openmw/mwmechanics/actors.cpp
2014-04-28 12:27:57 -04:00
Marc Zinnschlag
421679b319
Merge remote-tracking branch 'scrawl/master'
2014-04-28 15:13:09 +02:00
mrcheko
35c1724d39
unblock vertical aiming for combatants
2014-04-28 16:34:49 +04:00
scrawl
0796815da0
Ignore dead actors in getActorsFollowing/Fighting
...
Prevents dead enemies from disallowing resting near them
2014-04-28 11:44:56 +02:00
Marc Zinnschlag
0b2371a05d
Merge remote-tracking branch 'thoronador/fix-minor-stuff'
2014-04-28 10:59:34 +02:00
Marc Zinnschlag
af322a9f77
Merge remote-tracking branch 'scrawl/master'
2014-04-28 10:48:57 +02:00
scrawl
1da99d9fc7
Remove unused variable
2014-04-28 10:26:24 +02:00
Thomas
dc54bd5a5f
Merge remote-tracking branch 'upstream/master'
2014-04-27 20:56:45 -04:00
Thomas
c2127845af
Added onKnockdown command
2014-04-27 20:54:22 -04:00
mrcheko
22cdb166f2
warning fix, vars renaming
2014-04-27 22:38:04 +04:00
Thoronador
1b8c975d5b
minor performance improvements in apps/openmw
...
Checking for emptiness using size() might be inefficient, because
it can take linear time, while empty() is guaranteed to take only
constant time.
For non-primitive types, postfix ++ operators are inefficient
compared to prefix ++ operators, because post-increment usually
involves keeping a copy of the previous value around.
2014-04-27 19:10:23 +02:00
Marc Zinnschlag
ca097e146b
Merge remote-tracking branch 'jeffreyhaines/master'
2014-04-27 17:35:10 +02:00
Jeffrey Haines
edbc319c42
fixed logic. ||
2014-04-27 10:05:34 -04:00
Jeffrey Haines
52bb7c3f69
fixed logic. !
2014-04-27 09:55:38 -04:00
Jeffrey Haines
7599b26d30
Fixed: creatures won't witness crimes
...
and potential crash.
2014-04-27 09:37:43 -04:00
Jeffrey Haines
0409e18a0e
revert
2014-04-27 09:35:49 -04:00
Jeffrey Haines
b9bd4bc126
broken
2014-04-27 09:34:59 -04:00
Jeffrey Haines
ce106d3bec
Revert "NPCs detect crime exclusively"
...
This reverts commit 54d9615d85ae856ad4fdd2c130ac9cb0cd847c72.
Conflicts:
apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
2014-04-27 09:34:33 -04:00
mrcheko
82121e0401
some checks reworked
2014-04-27 16:59:21 +04:00
scrawl
e42855d522
Minor fix for spell icon
2014-04-27 12:54:18 +02:00
mrcheko
6a3dddfb9a
merge master
2014-04-27 13:49:31 +04:00
scrawl
3eb1e4e117
Fixes #1241 : Removed disposition-based combat conditions
...
The information for this code came from UESP, which in turn cites a (extremely vague) section from the TES-CS help text, so no surprise that it wasn't accurate.
The guard on the boat has a fight rating of 70, so with the old code it would attack on sight if the disposition is low enough. BTB-Character.esp includes something (not sure what) that drops his disposition to 35 when playing as a Khajiit, making him attack.
Testing in Vanilla it appears that disposition has no effect on combat engagement at all. Even with disposition 0 and fight 70 the NPCs don't attack.
Setting an NPCs fight rating to 70 or less still has a meaning, because the higher it is, the easier it becomes to raise the fight rating to 80 (by taunting, for example).
2014-04-27 09:43:54 +02:00
scrawl
e8210c92c6
Fixes #1240 : Don't hardcode drowning time
2014-04-27 04:27:26 +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
Thomas
c2b692e124
getActorsFollowing/Fighting no longer returns dead actors
2014-04-26 17:21:53 -04:00
mrcheko
dbe1307de0
code refining + minor fixes
2014-04-26 22:21:20 +04:00
scrawl
04964595ef
Fixes #1270 , Fixes #1201 : Update active weapon/spell icons every frame
2014-04-26 16:44:20 +02:00
scrawl
ef39b0f6ab
Fixes #1291 : Faction rank saving issue
...
A value of 0 is the first rank, -1 means not a member
2014-04-26 11:41:44 +02:00
scrawl
91e50585ff
AiWander: make sure to walk, not run
2014-04-26 05:01:26 +02:00
mrcheko
f3626adc86
remake of z-moving in combat for flying/swimming enemies
2014-04-26 00:20:55 +04:00
Marc Zinnschlag
c63d6437c0
Merge remote-tracking branch 'jeffreyhaines/master'
...
Conflicts:
apps/openmw/mwbase/mechanicsmanager.hpp
2014-04-25 15:29:23 +02:00
Thomas
f3272c941f
Fix for bug #1080 , can't read/repair/make potions/use soul gems/rest/sleep while in combat.
...
The radius for being in combat with the player is fAlarmDistance, which looked like the only pertinent thing.
2014-04-24 22:47:45 -04:00
Jeffrey Haines
42b879a9a5
Reworked the accusation of actors
2014-04-24 22:41:05 -04:00
Jeffrey Haines
c3e08916da
Sneak: Added support for state checking
...
I need advice one what I should do in order to pass mActors over to the
player. Particularly line 139 in player.cpp
2014-04-24 20:40:17 -04:00
Thomas
f6deca7c80
Fixed various issues caused by late-night coding. Also added "unlock" message to unlocked doors
2014-04-23 13:02:51 -04:00
Thomas
61341d4206
Removed mLocked, kept it as "Negative lock level means unlocked"
2014-04-23 10:00:18 -04:00
Thomas
cac8e52154
Seperated locked and lock level, to allow for relocking doors to previous lock level.
...
The data is stored in the esm as -lockLevel if unlocked; lockLevel if locked. While not tested, it should not present any problems.
2014-04-23 05:12:07 -04:00
Thomas
e71a119c23
Made aifollowers run when long distances (800 or 10000, depending) from what they're following.
2014-04-23 02:57:48 -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
Marc Zinnschlag
a91b386381
Merge remote-tracking branch 'jeffreyhaines/master'
2014-04-20 13:34:58 +02: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