Joonas Rikkonen
|
155cb83f91
|
(f0f961ac3) Fix some priority related issues.
|
2019-05-16 05:33:46 +03:00 |
|
Joonas Rikkonen
|
3b72edfe94
|
(227a6e696) Improve readability.
|
2019-05-16 05:33:29 +03:00 |
|
Joonas Rikkonen
|
e367f900b8
|
(2a4bd39c2) Merge branch 'dev' into human-ai
|
2019-05-16 05:33:13 +03:00 |
|
Joonas Rikkonen
|
a3db11876b
|
(d34fb2097) Major refactoring: - Replace custom logic regarding subobjectives with generic logic. - Ensure that all the objectives follow the same logic, reduce duplicate code where possible.
|
2019-05-16 05:32:56 +03:00 |
|
Joonas Rikkonen
|
05270aa165
|
(d9e651e1c) Add a generic method for handling subobjectives, when we don't use a collection but individual references instead.
|
2019-05-16 05:32:37 +03:00 |
|
Joonas Rikkonen
|
0714599f05
|
(10a11fd09) Rename a variable.
|
2019-05-16 05:32:20 +03:00 |
|
Joonas Rikkonen
|
2b029fc61a
|
(0c17563ce) Temporarily disable the initiative.
|
2019-05-16 05:32:04 +03:00 |
|
Joonas Rikkonen
|
5f610caadd
|
(f0837188e) Bots now target only reported targets when the objective is not an order.
|
2019-05-16 05:31:48 +03:00 |
|
Joonas Rikkonen
|
4f825ce309
|
(dabdac1a8) Fix bots waiting where they should not wait.
|
2019-05-16 05:31:31 +03:00 |
|
Joonas Rikkonen
|
27506eb10f
|
(2aa8e6b24) Reduce the get item range.
|
2019-05-16 05:31:15 +03:00 |
|
Joonas Rikkonen
|
ddd61a9243
|
(6d28a11e5) Ignore platforms in pathfinder raycasts. Should fix #1450.
|
2019-05-16 05:30:58 +03:00 |
|
Joonas Rikkonen
|
7614642d93
|
(e7b2add9d) Merge branch 'human-ai' of https://github.com/Regalis11/Barotrauma-development into human-ai
|
2019-05-16 05:30:39 +03:00 |
|
Joonas Rikkonen
|
54a0164f89
|
(98501b696) Reduce the max accepted distance for repair tool ai operate.
|
2019-05-16 05:30:23 +03:00 |
|
Joonas Rikkonen
|
348f21598e
|
(439481a07) Set the random factor for initiative each time the objective changes and once per 5 secs when the idle is active. Change the formula. Fix the waiting after character has been unselected.
|
2019-05-16 05:30:06 +03:00 |
|
Joonas Rikkonen
|
9334b71939
|
(d732f31b3) Enable initiative and courage. Implement initiative.
|
2019-05-16 05:28:59 +03:00 |
|
Joonas Rikkonen
|
eadd063950
|
(d82a5d3f3) Use the wait delay for all objectives that are not orders (instead of just idle).
|
2019-05-16 05:28:41 +03:00 |
|
Joonas Rikkonen
|
ab49749f8b
|
(877db615c) Set find safety priority to 100 when the current hull is null.
|
2019-05-16 05:27:33 +03:00 |
|
Joonas Rikkonen
|
78b1d8ef8d
|
(d0dd81be0) Rename a method.
|
2019-05-16 05:26:58 +03:00 |
|
Joonas Rikkonen
|
a447a47661
|
(06129f656) Add some missing texts. Incomplete.
|
2019-05-16 05:26:25 +03:00 |
|
Joonas Rikkonen
|
268389a128
|
(c5e44ed94) Take access into account before accepting a path. Fixes bots trying to reach places where they have no access to (#1351).
|
2019-05-16 05:26:09 +03:00 |
|
Joonas Rikkonen
|
812598774e
|
(24bcea40e) Fix the ai checks about door buttons. Don't aim at targets that cannot be seen.
|
2019-05-16 05:25:52 +03:00 |
|
Joonas Rikkonen
|
f46990d539
|
(d74fee449) Revert "Fix bots not knowing how to use the integrated controllers, effectively failing to use the doors with integrated buttons."
|
2019-05-16 05:25:20 +03:00 |
|
Joonas Rikkonen
|
e284e1039a
|
(ee2d498e3) Fix bots ignoring doors when shooting.
|
2019-05-16 05:24:28 +03:00 |
|
Joonas Rikkonen
|
4c53a56b20
|
(e25e32b17) Fix bots not knowing how to use the integrated controllers, effectively failing to use the doors with integrated buttons.
|
2019-05-16 05:24:11 +03:00 |
|
Joonas Rikkonen
|
52d25694ed
|
(050157f65) Fix bots not being able to use buttons or ladders because the were aiming. Don't aim when farther than 500 pixels away from the target.
|
2019-05-16 05:23:39 +03:00 |
|
Joonas Rikkonen
|
053ef60fc4
|
(deee8cd6d) Merge branch 'dev' into human-ai
|
2019-05-16 05:23:20 +03:00 |
|
Joonas Rikkonen
|
cf55de90ba
|
(0ccb08c95) Remove item collision category, since we only want to check the walls and the characters here.
|
2019-05-16 05:22:30 +03:00 |
|
Joonas Rikkonen
|
ad604a44c4
|
(0bc1c5f88) Fix bots trying to rescue enemies in single player game.
|
2019-05-16 05:22:12 +03:00 |
|
Joonas Rikkonen
|
99307f764a
|
(a47ab977d) Allow shooting through platforms.
|
2019-05-16 05:21:56 +03:00 |
|
Joonas Rikkonen
|
9ec9adb2a7
|
(cec5cdbcd) Reset steering when an objective is activated.
|
2019-05-16 05:21:39 +03:00 |
|
Joonas Rikkonen
|
1e200722ae
|
(81244db07) Implement AIObjectiveFightIntruders.
|
2019-05-16 05:21:03 +03:00 |
|
Joonas Rikkonen
|
88de435487
|
(cf495e03c) Check the visibility to the target when engaging (the distance is not enough, if there's something blocking the line of sight).
|
2019-05-16 05:20:45 +03:00 |
|
Joonas Rikkonen
|
3b313976c5
|
(5394332a8) Add a note.
|
2019-05-16 05:19:52 +03:00 |
|
Joonas Rikkonen
|
bcd18aab4e
|
(8025561da) Implement offensive combat.
|
2019-05-16 05:19:31 +03:00 |
|
Joonas Rikkonen
|
363eb0540a
|
(a8f2f39bd) The ai now sorts the weapons by the combat priority value, which can be set in xml. Ranged weapons are favored. The required items are also taken into account.
|
2019-05-16 05:19:14 +03:00 |
|
Joonas Rikkonen
|
65e284bf7c
|
(0fde6c604) Ignore dangerous targets.
|
2019-05-16 05:18:37 +03:00 |
|
Joonas Rikkonen
|
f61bff8970
|
(a1fe45652) Add some margin.
|
2019-05-16 05:18:01 +03:00 |
|
Joonas Rikkonen
|
cbfef49e9d
|
(d9fd52f40) Change the priority calculations for charge batteries and pump water loops. Tweak the operate item priority calculation.
|
2019-05-16 05:17:42 +03:00 |
|
Joonas Rikkonen
|
c9bfc21880
|
(49f837fbb) Fix: operate battery or pump should not be looping objectives.
|
2019-05-16 05:17:24 +03:00 |
|
Joonas Rikkonen
|
6c777aa91e
|
(d7e59613a) Ignore broken items.
|
2019-05-16 05:16:47 +03:00 |
|
Joonas Rikkonen
|
5b3696f7e4
|
(d16942d30) Simplify.
|
2019-05-16 05:16:13 +03:00 |
|
Joonas Rikkonen
|
82d74f7481
|
(a1ebc2642) Use lazy loading to ensure that the list is assigned when it's needed. Fixes null reference exceptions when pumping water or charging batteries.
|
2019-05-16 05:15:34 +03:00 |
|
Joonas Rikkonen
|
2ae54a01a5
|
(ac7ab10b0) Pass AIObjectiveManager reference in the constructors instead of methods so that we can always access it.
|
2019-05-16 05:14:20 +03:00 |
|
Joonas Rikkonen
|
8be0b0676e
|
(83868bb0e) Refactor AIObjectiveExtinguishFires to use the AIObjectiveLoop class. Significant refactoring of the other looping objectives. Reduce the duplicate code.
|
2019-05-16 05:13:40 +03:00 |
|
Joonas Rikkonen
|
7fb7c13198
|
(fbfb76aeb) Implement automatic extinguishing. TODO: should use the AIObjectiveLoop class.
|
2019-05-16 05:13:21 +03:00 |
|
Joonas Rikkonen
|
ab2ca90d08
|
(900eddc26) Take the priority modifier in account when calculating the priority, not the max value.
|
2019-05-16 05:13:03 +03:00 |
|
Joonas Rikkonen
|
019712ef66
|
(829458a66) Don't apply priority modifier on the priority value, because it's already applied to the max value. The priority value should be normalized, because we are using the lerp.
|
2019-05-16 05:12:07 +03:00 |
|
Joonas Rikkonen
|
dbccd76613
|
(c6ca0ef58) Recreate objectives when the bot is dismissed.
|
2019-05-16 05:11:49 +03:00 |
|
Joonas Rikkonen
|
de8a23f687
|
(1137f730e) Instead of forcing the looping objectives to use the average, let them decide the method of evaluating the targets. Use the highest priority for now.
|
2019-05-16 05:11:32 +03:00 |
|
Joonas Rikkonen
|
759e4aee0d
|
(96ccafd88) Fix the goto objective not always completing because of too high NearEnough value.
|
2019-05-16 05:11:17 +03:00 |
|