branchrust_reboot/main/harbor_tweaks_4_cargoshipcancel
53 Commits over 31 Days - 0.07cph!
Prevent cargo from tilting on harbor approach
Improve error messages if approach node isn't found
Ensured cargo ignores height of waypoints - keeping it at the correct water height
Revert Procedural Map - Sorry Aux2!
Made the docking test map smaller again
Fixed egress working if it was in the process of actually entering or leaving harbor
Fixed harbor 1 to work with new path
Refactored all of the movement code
Remade harbor 2 path to work with new movement
Improved cargo docking movement code to handle tighter situations
Prevents clipping on harbor geometry
Moves on rails with more deterministic movement overall
Ensured trigger is set properly on one of the harbor 1 cranes - prevents flyhack kick
Added a more accessible harbor 2 cargo path
Fixed issue preventing harbor 2 from being considered as a docking point
Prevent cargo from trying to leave the map mid dock. Now waits until docking has finished before leaving.
Fixed bug causing cargo to freeze when swapping between standard points and approach points.
Bowpoint used for steering throughout
Prevented cargo from waiting twice
Improved reliability of throttle - cache old speed and use it if unsure of next waypoint speed
Fixed isues causing follow to zero rotation on approach
Fixed cargo speed limiting bugs
Cargo now looks at previous node to find desired speed
Completely remove throttle based movement on approach. On rails style movement instead
Fixed off centre harbor 2 incoming path
Fixed swing bridge partly opening
Cargo now steers with its front rather than pivot point when docking:
This prevents:
-clipping with geometry
-turning too fast/too slow
-Innacurate movements
Removed a bunch of throttle lerps and rotation lerps when docking
Tried to fix broken swing bridge animation
Fixed weird cargo movement bug
Added cargoship save support
Ran protobuf
Flipped harbor 1 path
Adjusted swing bridge animation
Smoothed approach path
Still broken spawn nearby command
Harbor 1 ladder and parent triggers
First attempt at spawn near for docking command
Cargo decides what harbor to dock at based on spawn distance
Cargoship now moves around the island anti-clockwise
Re-added cargo notifier to harbor2
Scene2Prefab
Added should_dock convar to cargoship
Harbor 1 now does additional terrain checks to ensure cargo docking path is clear
Increased required boat depth in costmap to ensure cargo can dock at the appropriate harbor
Fixed cargo NRE if theres no harbors in the world
Ensured cargo only docks once
Set default dock time to 8 minutes
Set better stopping location on harbor 1
Smooth cargo ship docking rotation
Cargo dock time now uses convar
Debug docking now set as a replicated var
Removed cargo docking from harbor 2
Ensured harbor 1 and 2 now have boat access
Ensured approach nodes list is initialised
Added second harbor to test scene
Added docking path to harbor 2
CargoShip now supports multiple harbor paths registered
Flipped entry path so cargo comes in from the other direction
Added check to ensure container destinations have at least 1 element before passing
Ensure harbor crane isnt null before assinging desination
Added a debug log when leaving
Cargo ship calls OnArrivedAtHarbor then waits
Once finished waiting it rejoins the outer patrol as normal
Cargo Docking~
Cargo does basic docking at a harbor (currently only supports big harbor)
Cargo now selects best node from the outer patrol to start entry from
Cargo now adjusts waypoint distance dynamically when entering docking
Cargo ship now responds to max velocity on harbor entry Base Path
Adjusted a bunch of speed and position values on harbor entry path
Bunch of debug stuff to show patrol tangents and docking point scores
Added boolean to WorldSetup to force ocean patrols to be generated with dev terrains
Sorted test map so boat outer patrol paths can be generated properly
Adjusted cargo path
Notifier component placed harbor
Reran Scene2Prefab
Initial approach logic:
Cargo now calculates tangents of each patrolfar node and compares the angle and distance to find the best scoring point
Debug outputs for this
Scene2Prefab
Added docking path to harbor 1