branchrust_reboot/main/naval_update/scientist_boat_aicancel
133 Commits over 61 Days - 0.09cph!
Dont kill rest of the scientists when the driver dies (not intentional)
Only allow killing scientists to happen once
Call die on scientists so the loot bags spawn
Fix logic bug in pursue player that could possibly cause recursive behaviour (Active target check was flipped)
naval_update -> scientist_boat_ai
If a boat is sinking dont keep trying to apply corrective forces. These forces have always been applied - without it boat sinking looks really cool
Ensure players are properly killed
Dont do any clipping checks for AI on the PT Boat and RHIB
Add new ClippingCheckAiMode to BaseVehicle.Server
Let's us skip clipping checks for AI, or apply to both AI and players
Boat AI will automatically turn on the lights if its nighttime, keeps them off if its day
Better lights on the RHIB
Use raycasts for avoidance instead. Spherecasts are just too unstable
When boat dies kill all remaining scientist on board
Pass mount point for spawning, dont rely on position
Stop info box breaking with 'null action'
Dont ram a player if they are way higher up on an island
Stop group members including themselves in the pursuit notifications
This prevents an infinite loop when pursuing a player
Better scientist mount position spawning code
Compile fixes
Ensure boats have minimum: driver and turrets
Then at least 1 other
Then we coin flip each subsequent scientist
Spawn rhibs facing towards the deep sea centre
Codegen after merging naval update
naval_update -> scientist_boat_ai
Fix compile error with our new changes
Remove a dumb 200 byte allocation on our blur step
Integrate RHIBs into the deepsea
Spawn them in cool triangle formations (auto generate groups)
Wiping the deep sea will wipe rhib group info
Only try and maintain cohesion in the wander state
Add some methods to wipe coordination when the deep sea resets
simple boid behaviour in groups
groups will attempt to stick together as much as possible
Add 'grouping' system:
Boats can be spawned in groups
If one of the group members targets an enemy we can ensure all of the boats target the same one, this keeps them all focused and together
AI boats will now attempt to ram players
AI Boats will sometimes drive by the targets then pull in front or behind them
Reverse steering if we are going backwards
Bring back incremental steering
Fixed bugs with moving the claim from one boat to the other
If a claimant boat to a target is removed then inform the other boats that a new claimant position has opened up
This means if you kill the main boat attacking you, the other boats waiting in the attack 'queue' can have a stab at killing you instead
Much better near and far distances when dealing with the boat coordinator
Debugging
Connect to the coordinator on init and leave on remove
When you find a target that you want - register it as yours, this prevents other boats from taking it
Boat coordination system setup
Provides an avenue for boats to claim/unclaim targets, this prevents lots of boats from dogpilling on a single target
If driver is killed - totally remove AI
Make RHIB scientists much weaker than regular scientists
Prevent overcorrection when approaching targets
Put debug drawing behind a variable
Move constants to BoatAI.Data
Prevent Reserializing fields when changing symbols
Apply blurring over the whole context space to try and prevent oscillations between very similar states
Use scoring for picking context directions rather than lowest danger weighting
Prevent boats from jiggling once they reach their target position
Codegen
scientist_boat_ai -> naval_update
Remove logs
Add back avoidance