branchrust_reboot/main/ai_wolf_iterationcancel
379 Commits over 153 Days - 0.10cph!
Remove remnants of fsm tags, add strafe mode to path follower, add CanSeeTarget fsm transition
Make sure wolf can transition from hurt to death
Fix wolf sight tracing to prey feet, often causing it to be blocked
Fix wolf hovering slightly above ground
Make new wolf DPS equivalent to the current one
Wolves will not bother howling if their prey is unreachable
Wolves will favour targeting players over other NPCs unless the other NPC is way closer
Remove FSM tags, exhaustive transitions turn out to be easier to debug and manage
Add budgeted queue for pathfinding requests
Have wolves clear their target after eating, as else they can hunt you down after finishing their food if you passed them while they were eating
Allow wolves to eat corpses and meat
Refactor targeting component to be budgeted and part of sense component, this fixes a bunch of issues where wolves would overcommit and ignore other threats closer to them
Have wolves eat corpses and meat
Fix wolves thinking they already finished moving instead of waiting for the async path request result
Prevent being able to bully wolves by repeatedly shooting at their feet to scare them away, fix wolves trying to cancel their reaction to fire
Streamline wolf interruption behaviour, assign target upon hearing noise
Polish and budget NPC hearing, reduce charge range
Improve fidelity of wolf consecutive attacks when the player keeps walking backwards, or is standing still
Make wolves react to lit torch swings and projectiles landing near them
Wolves can wait longer in a spot while roaming, reducing the number of path queries made by roaming wolves
Fix sense refresh time not accounting for budgeting delaying refresh
Make senses tick instead of being evaluated on demand
On demand senses are harder to debug and visualize, as well as only causing a minor performance gain
Ticking is more predictable performance wise and easier to keep track of in the frame budget
Senses tick faster if a player is near the NPC
Remove old dead AI code, hook up some events in preparation for NPCs being able to react to bullets impact near them or flying past them
Allow wolves to target other wildlife again, fix errors when target dies while circling
Optimize wolves LoS checks (ignore other wolves, spread computations over multiple frames, pool sight events), also ignore players in safe zones
Fix inverted transition in wolf fsm
Use GetCornersNonAlloc to avoid unity copying the npc paths everytime they are accessed
Cover performance critical code with time warnings
Skip entity query distance checks in wolf sight to avoid doing them twice
Have the wolve's meshes rotate to follow their movement on slopes, but only the pitch, and only up to 30 degrees
Fix wolf anim not always being cancelled on state transitions, add "or" transitions, wolves will now all flee together instead of separating if one is shot while the player is protected by fire or is very far away
Fix compile errors caused by serialized fiels in server only parts of the code
Fix editor only code causing compile issues
Fix editor only code being used outside of editor directives
Add more weapons to editor combat loadout
Make targetting component more robust, make wolves react more believably when shot with long range weapons
Conservatively fix compile error caused by #if SERVER
Make target component API usage more consistent
Bring wolf to 0 runtime allocs by removing a lambda in the senseComponent
Remove lambdas from wolf fsm transitions in preparation for it to be data driven
Add distance check option enum to entity query
Add profile markers to FSM
Add missing profile markers
Add profile markers for parts of the codes that can do traces, path queries and entity queries
Remove uses of lambdas in entity queries to avoid subtle allocations