bot waypoints

Merged terencehill requested to merge terencehill/bot_waypoints into master

Waypoint travel cost:

  1. Fix estimation of time needed to reach jumppad destination
  2. Express cost of normal waypoint links in time needed to cross them at constant walk speed so it's comparable with cost of jumppad links
  3. Waypoint link cost: take into account height difference
  4. When bots are able to bunnyhop reduce travel cost of waypoint links
  5. Reduce Increase travel cost of underwater paths

Waypoint editor:

  1. Fix g_waypointeditor_unreachable command not showing player model for spawnpoints not connected with any waypoint
  2. g_waypointeditor_unreachable: avoid a qc crash when there's no waypoint nearby
  3. Snap waypoint to item's origin if close enough (can be disabled on the fly by pressing the CROUCH key); don't allow spawning a waypoint too close to another one
  4. Show links from other waypoints to the current waypoint while holding the CROUCH key
  5. Display hardwired waypoints purple
  6. On waypoint spawn print the actual waypoint origin
  7. Print an error message if player can't spawn a waypoint

Jumppads / teleports / ladders / warpzones:

  1. Improve linking of normal waypoints to ladders by autogenerating waypoints for ladders
  2. Fix bots sometimes getting stuck in front of certain teleports (e.g. Boil's teleport)
  3. yay! Fix bug causing bots to ignore teleports and warpzones
  4. If for some reason a bot selects teleport/jumppad/warpzone origin as route destination automatically add teleport/jumppad/warpzone destination to the route
  5. Improve automatic generation of jumppad waypoints
  6. Improve automatic waypoint generation for jumppads with a slow horizontal speed; don't generate any waypoint for jumppads that can't be helped if destination wp would end up on the jumppad itself. Improve handling of jumppads during bot navigation especially for the new waypoints
  7. NEW Improve automatic waypoint generation of jumppads with a high horizontal push. It fixes jumppad to jumppad to strength and jumppad to vortex in the map The Yard
  8. NEW Fix broken automatic waypoint generation for jumppads really close to other jumppads (e.g. the row of 3 jumppads in Runningman)
  9. Fix linking to teleports and jumppads waypoints not working from a lower point of the map because the chosen destination point is usually stuck in solid (it seems jumppads and teleporters are usually partially "underground")
  10. Fix ladder/jumppad/teleporter destination waypoints stuck in solid if they end up on a model (jumppad near megahealth in finalrage)
  11. Fix linking to certain teleports and jumppads sometimes not working (e.g. beyond a certain distance from final rage teleporter)
  12. Greatly improve linking to teleports and jumppads by expanding their waypoints to include half player's body since bot only needs to touch them, not to enter them. E.g. 2 jumppads in the central room in the map Cucumber can now be linked from both sides, previously possible only frontally
  13. Jump if touching the bottom of a teleport/jumppad waypoint from a lower position (it fixes jumppad to Strenght in Oilrig)
  14. Fix waypoints for warpzones with oblique or horizontal warp plane
  15. NEW Bot AI: fix ambiguous jumppad touch detection


  1. Assume bot can walk from wp A to item X if wp A is linked to wp B and wp B origin matches item X origin (with a very small tolerance)
  2. Avoid a tracewalk call by creating links from waypoints to items

Walk navigation:

  1. allow reaching goals in the air if they are in the fall direction (perpendicular)
  2. Reduce stepwalk height when there's an obstacle (e.g. a very low ceiling) above current position

Underwater navigation:

  1. fix and greatly improve underwater navigation
  2. Allow bots to pick up underwater items


  1. Fix player spawn points not linked from/to any waypoint when there's a very low ceiling or obstruction; it fixes spawn point near mega armor in Boil
  2. Add a versioning system for bot waypoint files: outdated links are now automatically updated and saved on map start
  3. NEW save race bot waypoints / links to different files mapname.race.waypoints.*
  4. NEW Don't automatically update outdated Assault waypoint links since all objectives but last one need to be destroyed before saving them
  5. NEW Bot AI: workaround for untouchable race checkpoints that cause bot to get stuck (e.g. in front of Stormkeep's warpzone)
Edited by terencehill