Commit Graph

27 Commits

Author SHA1 Message Date
Serhii Snitsaruk 60142b191d
Fix invalid access crash on exit in LimboHSM
Since #131, `LimboState::_exit()` became a source of potential crashes
if object references are used without a validity check. It's too easy
to miss this, which can lead to game crashing during runtime.

This fix reverts #131 change and proposes alternative approach of
re-activating root HSM upon tree entering if it was previously active.
Note that it's not an ideal solution, as some state will be lost upon
re-parenting: HSM exits and then re-activates and enters its initial state.
2024-09-22 13:57:15 +02:00
Serhii Snitsaruk ac2d734122
Use different prefetch root for the base plan in BTPlayer and BTState 2024-09-15 15:47:11 +02:00
Serhii Snitsaruk 9da16a1e0f
Clean up unused string names 2024-08-21 20:04:35 +02:00
Serhii Snitsaruk 000f9c15d8
Fix BTState overwriting blackboard variables on init 2024-08-15 23:41:36 +02:00
Serhii Snitsaruk cd0bc8e796
Register and call virtual methods on scripts in GDExtension 2024-06-30 12:34:06 +02:00
Serhii Snitsaruk 06de52492a
Fix reparenting an agent deactivates its HSM 2024-06-03 14:55:00 +02:00
Serhii Snitsaruk a572613001
BlackboardPlan: Utilize mapping in LimboHSM
Also changes how parent plan providing is implemented (used for editor hints).
2024-05-15 11:38:53 +02:00
Serhii Snitsaruk 4207fbf8f3
Fix `LimboState::get_root` freezes the process 2024-04-21 16:26:41 +02:00
Serhii Snitsaruk 5ff42e29e4
Always duplicate `BlackboardPlan` props 2024-04-01 01:11:51 +02:00
Serhii Snitsaruk 06ebff7518 Fix includes and build errors 2024-03-12 21:09:28 +01:00
Serhii Snitsaruk b09006a11b Fix issues with blackboard plan system 2024-03-11 18:58:40 +01:00
Serhii Snitsaruk 2658060b1c Move prefetching code into `BlackboardPlan` and add checkbox to the plan editor 2024-03-06 21:28:06 +01:00
Serhii Snitsaruk 4c26583007 Remove "p_" from the argument names in the `ClassDB` bindings 2024-03-04 21:36:16 +01:00
Serhii Snitsaruk 88df78c4a2 Refactor HSM to use StringName for events 2024-03-04 16:19:35 +01:00
Serhii Snitsaruk eaeb57e2d7 Allow `LimboState::dispatch` to be called from inside the hierarchy.
Improves usability and removes requirement to call this method on the root state (see #49).
2024-03-01 11:02:32 +01:00
Serhii Snitsaruk a251d92aa3 Update class documentation 2024-01-25 14:56:59 +01:00
Serhii Snitsaruk 8155c2764a Refactoring and clean up 2024-01-25 14:35:48 +01:00
Serhii Snitsaruk 20a995d1d2 Rename BlackboardSource => BlackboardPlan
Because it's a better name ;)
2024-01-23 20:02:23 +01:00
Serhii Snitsaruk a247d0d67b Replace node blackboard data with BlackboardSource 2024-01-23 12:05:54 +01:00
Serhii Snitsaruk a3f8c09766 Use the new virtual workaround and rework LimboState and HSM 2024-01-18 11:33:24 +01:00
Serhii Snitsaruk c875f9d5d6 Fix BTState virtuals not being called 2024-01-13 19:08:34 +01:00
Serhii Snitsaruk f546e285b7 Refactor and clean up the code 2024-01-13 17:10:42 +01:00
Serhii Snitsaruk 947e253bf9 Fix infinite call recursion crash due to virtual function workaround 2024-01-12 23:20:39 +01:00
Serhii Snitsaruk 9645baeb30 Port LimboAI plugin and editor 2024-01-09 13:34:24 +01:00
Serhii Snitsaruk f5b1b52f67 Port LimboHSM, LimboState and BTState 2024-01-07 05:54:17 +01:00
Serhii Snitsaruk 62e07e4395 Add MIT license - LimboAI is now Open Source! 2023-07-22 19:41:01 +02:00
Serhii Snitsaruk 5dc002098f Reorganize files and sort includes 2023-07-20 18:35:36 +02:00
Renamed from limbo_state.cpp (Browse further)