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
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
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
9a1e7f8212
(1c6954251) Add IsLoop property. Fixes operate item orders being removed when they are done. Instead of calling loopable objectives done, let's just use the priority system.
2019-05-16 05:11:01 +03:00
Joonas Rikkonen
d0795791e7
(3bb9485ad) Add automatic orders as objectives instead of orders so that we can take advantage of the existing priority system. Turn the priority values defined in the xml into modifiers.
2019-05-16 05:04:53 +03:00
Joonas Rikkonen
039d07f693
(a2943d8b7) Merge branch 'dev' into human-ai
2019-05-16 05:04:10 +03:00
Joonas Rikkonen
60f52375e6
(7788ec72a) Test issuing orders automatically.
2019-05-16 05:03:49 +03:00
Joonas Rikkonen
6262b3ea54
(ce8e185aa) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
2019-04-16 17:12:09 +03:00
Joonas Rikkonen
bd07acf26d
(052ab6307) Use MonoKickstart on Linux so installing Mono is not required, fixed division by zero if the width of the server console window is 0
2019-04-16 17:11:49 +03:00
Joonas Rikkonen
66de47f041
(a83cec9d6) Made room names translatable, added "RoomName." to all room names in EnglishVanilla.xml
2019-04-15 12:06:58 +03:00
Joonas Rikkonen
cc0e217e82
(e1476e522) Cleanup.
2019-04-15 12:01:32 +03:00
Joonas Rikkonen
3877c18d0c
(c15419d90) Changelog additions + merge fix
2019-04-08 19:20:05 +03:00
Joonas Rikkonen
28f2c00255
(02bbfb6a3) Let the ai objectives handle waiting (after switching characters). Currently only idle objective uses wait timer, others ignore it. Reduce the wait time from 20 to 10 secs.
2019-04-08 15:59:36 +03:00
Joonas Rikkonen
1ffe3e4ec0
(6b95aa87e) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
2019-04-08 13:36:44 +03:00
Joonas Rikkonen
2efcd200f5
(17490598f) Don't allow putting items into locked inventories by double-clicking (causes them to be dropped in multiplayer)
2019-04-08 13:36:30 +03:00
Joonas Rikkonen
10776572d2
(0eef99a8b) Don't change targets, wander or stay still in ladders. Don't stay still in water. Improve bot behavior in close spaces.
2019-04-08 13:36:16 +03:00
Joonas Rikkonen
9c07ebda53
(8311f9380) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
2019-04-08 13:36:00 +03:00
Joonas Rikkonen
d28b04ed3b
(30308f7e4) Fixed players being able to overwrite vanilla content when the vanilla package is not selected
2019-04-08 13:35:46 +03:00
Joonas Rikkonen
8a227a4f2c
(570318151) Cleanup.
2019-04-08 13:34:48 +03:00
Joonas Rikkonen
935cd6bc65
(235745275) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
2019-04-08 12:06:09 +03:00
Joonas Rikkonen
55eecc49d8
(842e6af33) Human AI needs AITargets too (not much, but they are still useful). Therefor add Type property to AITargets, so that certain targets can be treated human only and others enemy only. Implement target filtering in the Enemy AI Controller.
2019-04-08 11:58:50 +03:00
Joonas Rikkonen
33b205b1c7
(3300d3915) When searching for a new room to move to, AIObjectiveIdle only attempts to find a path to one potential room per frame. Fixes lag spikes caused by idling NPCs (was particularly noticeable if the character was in a room with no way out). Closes #1397
2019-04-07 21:44:15 +03:00
Joonas Rikkonen
1297127ae2
(0be4bd31d) Todo note about idling characters killing the framerate (see #1397 )
2019-04-07 13:41:07 +03:00
Joonas Rikkonen
2eaf22683d
(ae643deeb) Added alive checks to a couple of diving gear status effects (don't consume tanks when dead)
2019-04-01 22:47:22 +03:00
Joonas Rikkonen
ec7e23061b
(38b5d9aad) Experimental changes to syncing ragdolled (unconscious/dead) characters: - Higher error tolerance when syncing the positions. It's often hard to get the main limb exactly to the same position as the collider, because the positions of the limbs aren't synced and the pose of the ragdoll may differ between the server and clients. Increasing the tolerance makes it less likely for dead/unconscious characters to "twitch" when the game attempts to force the main limb to the position of the collider. - If the position of the ragdoll differs from the position of the collider so much that CheckDistFromCollider disables limb collisions, apply an additional force to all limbs to force the ragdoll to the correct position. Otherwise the ragdoll can occasionally start "hanging" midair, clipping through solid objects, because the main limb's pull joint doesn't necessarily have enough force to pull the entire ragdoll up to the collider.
2019-04-01 22:47:03 +03:00
Joonas Rikkonen
44a8bfce08
(808e7257d) Attempt to fix the issue where bots are not avoiding walls properly while wandering around.
2019-03-28 18:09:05 +02:00
Joonas Rikkonen
72e7cb6e99
(b0feecc1f) Use the code that includes wall avoidance for wandering also in AIObjectiveFindSafety and AIObjectiveGetItem when the target is unreachable.
2019-03-28 12:35:01 +02:00
Joonas Rikkonen
63eb4d64e5
f8b0295...0671290
2019-03-18 23:30:58 +02:00
Joonas Rikkonen
23687fbf2f
aeafa16...4d3cf73
2019-03-18 22:57:05 +02:00
Joonas Rikkonen
3301bed442
409d4d9...aeafa16 (merge human-ai)
2019-03-18 22:52:17 +02:00
Joonas Rikkonen
6c0679c297
38f1ddb...178a853: v0.8.9.1, removed content folder
2019-03-18 20:39:27 +02:00
Joonas Rikkonen
865b35c6cd
Fixed "attempted to access a removed AITarget" errors in AIObjectiveIdle
2018-08-07 16:49:17 +03:00
Joonas Rikkonen
604fc65154
Human AI improvements & fixes:
...
- Replaced item name comparisons with Prefab.NameMatches (-> item names can be changed without breaking the AIs).
- Having an AIObjective set as the current order of the character doesn't automatically cause it to have a high priority. For example, the order to fix leaks has a low priority if there are no leaks to fix.
- AIObjectiveFixLeaks makes sure the character is wearing a diving suit before going to fix a leak. The characters used to run in and out of flooded rooms because the AIObjectiveFindSafety objective would become active as soon as the character entered the room, causing the character to run out, and then immediately run back because they are no longer in immediate danger of drowning, making the FixLeaks objective the most high-priority one.
- Characters attempt to find a room with no water in AIObjectiveIdle even if the character is wearing a diving suit.
- AIObjectiveFindSafety considers flooded rooms dangerous even if the character is wearing a diving suit (-> the character attempts to go into a more dry room instead of happily idling in the flooded one).
- Distance to a hull doesn't decrease its desirability nearly as much in AIObjectiveFindSafety (-> fixes characters not bothering to move into a non-flooded room if it's far away).
- AIObjectiveOperateItem makes sure the item is equipped before using it (-> characters can't weld leaks with the welder in their inventory).
2017-12-21 19:49:26 +02:00
Joonas Rikkonen
f46dc5da28
Water flow logic tweaking:
...
- Less fluctuation, water doesn't constantly flow back and forth through gaps.
- Flowing water pushes characters around much more heavily, and the force is applied to the collider in addition to the limbs.
- Vertical gaps don't push characters up/down unless the character is roughly above/below the gap.
+ Renamed some fields in the hull and gap classes (Volume -> WaterVolume, FullVolume -> Volume, public fields start with a capital letter)
2017-10-10 21:07:45 +03:00
juanjp600
4d225c65f2
Updated to MonoGame 3.6 + Directory refactor
...
- Barotrauma's projects are in the Barotrauma directory
- All libraries are in the Libraries directory
- MonoGame is now managed by NuGet, rather than referenced from the installed files (TODO: consider using PCL for easier cross-platform development?)
- NuGet libraries are not included in the repo, as getting the latest versions automatically should be preferred
- Removed Content/effects.mgfx as it didn't seem to be used anywhere
- Removed some references to Subsurface directory
- Renamed Launcher2 to Launcher
2017-06-27 09:52:57 -03:00