Allofich
55ac1fab68
Change Wander duration to run on a counter
2016-06-10 04:36:18 +09:00
Allofich
bce66c629a
Change editor-placed AI packages to cycle
2016-05-29 17:34:40 +09:00
Austin Salgat
e9157e9200
Fix idle animation and Fix water creature manual wandering
2016-04-16 20:38:58 -05:00
Austin Salgat
84179c262f
Update manual wandering to prevent actor from leaving/entering water
...
Water creatures will stay in the water, while land creatures will stay on land when wandering.
2016-04-16 16:39:13 -05:00
Austin Salgat
fc03216d48
Refactor to reuse existing obstacle detection
2016-04-16 12:14:00 -05:00
Austin Salgat
34726c24d9
Fix mDistance being reset prematurely
...
This was causing wandering without pathgrids to become disabled for most wandering units. Additionally, wandering now behaves the same for both NPCs and creatures.
2016-04-15 21:56:41 -05:00
Austin Salgat
92b352989a
Add logic for NPC wandering without pathgrids
2016-04-13 20:48:08 -05:00
Austin Salgat
c02881a4f8
Fix creatures not wandering
2016-04-12 21:16:55 -05:00
scrawl
50ed061154
AiWander: reset mAllowedNodes on cell change ( Fixes #3176 , Fixes #3130 )
2016-02-02 00:41:40 +01:00
dteviot
31d82b6b0c
Unifiy evadeObstacles() logic between AiWander and AiPackage
...
Can't use same code, but logic is now same.
2015-08-30 08:32:47 +12:00
Arthur Moore
61c3835637
Don't try to play animations we know are bad
...
Prevents log spam
2015-07-31 18:01:02 -04:00
Arthur Moore
f69de1f263
Alert the user if trying to play a non-idle animation
...
Continue to propagate success/failure up the call stack.
2015-07-30 08:08:58 -04:00
dteviot
c7aacaee70
extracted function returnToStartLocation().
2015-07-26 17:29:32 +12:00
dteviot
5e519ef550
extract function isPackageFinished().
2015-07-26 17:29:01 +12:00
dteviot
ad0d807103
extracted function reactionTimeActions().
2015-07-26 17:28:32 +12:00
dteviot
9c0e3d6c28
extracted functions doPerFrameActionsForState() and onChooseActionStatePerFrameActions().
2015-07-26 17:25:44 +12:00
dteviot
76f95eafe7
extract function onWalkingStatePerFrameActions().
2015-07-26 17:25:00 +12:00
dteviot
5ec310dfba
extract function onIdleStatePerFrameActions().
2015-07-26 17:24:33 +12:00
dteviot
2a4d35b98c
fixed "comma at end of enumerator list" warning.
2015-07-20 18:20:57 +12:00
dteviot
00eef585af
renamed mPlayedIdle to mIdleAnimation.
2015-07-19 18:04:42 +12:00
dteviot
22f49128cc
replaced multiple booleans with single state variable.
2015-07-19 18:02:13 +12:00
dteviot
3ebe9fb34f
renamed mRotate to mTurnActorGivingGreetingToFacePlayer
2015-07-19 18:00:49 +12:00
dteviot
e294cd95cd
extracted function playIdleDialogueRandomly()
2015-07-12 17:15:14 +12:00
dteviot
0b089a5564
extracted function evadeObstacles()
2015-07-12 16:38:36 +12:00
dteviot
1ef78b1e56
extracted playGreetingIfPlayerGetsTooClose()
2015-07-12 16:37:31 +12:00
dteviot
df421fce92
extracted function setPathToAnAllowedNode()
2015-07-12 16:35:15 +12:00
dteviot
b508846a64
Renamed mStoredAvailableNodes to mPopulateAvailableNodes.
...
Don't call getAllowedNodes() needlessly.
2015-07-12 16:32:48 +12:00
dteviot
f1774ee7c3
Fixed compile failing on OSX and Linux.
2015-07-08 19:34:33 +12:00
dteviot
52cf8541f5
End point tolerance restored to 64 units.
...
Corrected problem pointed out by Scrawl.
Destination needs tolerance of 64 to avoid overcrowding.
2015-07-08 18:41:03 +12:00
dteviot
1239667cb4
AiWander uses points between PathGrid points ( Fixes #1317 )
...
When there is only on PathGrid point within a NPC's wander distance, expand possible wander destinations by using positions between PathGrid points.
2015-07-05 18:21:35 +12:00
dteviot
eb2aa965b9
Extracted function SetCurrentNodeToClosestAllowedNode()
2015-07-05 18:17:18 +12:00
dteviot
9a02a85a24
Pulled duplicate code into function.
2015-07-05 18:07:14 +12:00
dteviot
46a654286b
Remove fix for #1317
...
Expanding the AiWander distance for path grid nodes causes bigger problems than it solved.
2015-07-04 18:57:56 +12:00
scrawl
59db9664ba
Pass the CharacterController to AiPackage::execute
2015-06-26 17:47:04 +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
dteviot
be6ee927b9
AiWander, use closest two points if distance is too small ( Fixes #1317 )
...
In AiWander, if wander distance is set too small to get two points, take the closest two points.
2015-03-28 20:05:54 +13:00
dteviot
63ab856024
Removed duplicated code.
2015-03-23 20:57:36 +13:00
dteviot
407cd50890
fixed warning C4099:
...
type name first seen using 'class' now seen using 'struct'
2015-03-06 21:36:42 +13:00
Alexander "Ace" Olofsson
8c49812d56
Remove unneeded include in obstacle.hpp
2015-02-09 15:12:10 +01:00
scrawl
01652bbcc5
Store original actor position in AiWander package ( Fixes #2200 )
2015-01-01 03:38:49 +01:00
scrawl
a8ae0dec52
Implement AiWander fast-forward (Feature #1125 )
2014-12-31 18:41:57 +01:00
scrawl
61d1aa78ce
Move AiWander path finder to temporary storage ( Fixes #2082 )
2014-12-01 23:09:46 +01: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
4391c1fd00
Addded the parts of AiWander that I fully understand to the temporary storage.
...
The rest should be done by someone who has a clearer overview over the class.
2014-10-08 22:11:45 +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
1bb82c710c
Fix use of uninitialized memory in AiWander::init
2014-08-14 18:55:54 +02: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
scrawl
a54ac579a5
Savegame: Store AiSequence
2014-06-13 02:26:52 +02:00