Skip to content

Bots are not able to climb ladders #1588

@sunzenshen

Description

@sunzenshen

Build Info

20269103_fdb1747

Description

On the current master branch, bots fail to reliably scale ladders. The issue may have multiple contributing causes, such as pathfinding path costs, locomotion logic conflicts, and behavior system overrides.

  1. Path Cost Calculation Penalties - In CNEOBotPathCost::operator(), the check for height change (deltaZ) may prematurely reject valid ladder paths. If the vertical distance exceeds m_maxJumpHeight, the path is often discarded as "too high to reach", ignoring the presence of a ladder pointer which should validate the traversal. \neo\src\game\server\NextBot\simple_bot.h was used as an implementation example for CNEOBotPathCost, and it appears to have this same lack of checking for ladders. That said, when an exception is added for ladders and elevators, we encounter downstream problems that make the situation worse (where before the bots would just ignore the path, now they will get actively stuck when the try the following behaviors...).

  2. Locomotion Logic Conflict (Crouch-Jump) - When a bot mounts a ladder, IsOnGround() returns false. CNEOBotLocomotion::Update might interpret this as being "in the air" and automatically presses the Crouch button to facilitate a crouch-jump. In Source Engine, holding crouch while on a ladder might be causing the player entity to detach, preventing ascent.

  3. Stuck Monitor False Positives - It kind of looks like that the StuckMonitor logic in CNEOBotMainAction frequently misinterprets this state as being stuck. Consequently, CNEOBotMainAction::OnStuck triggers a recovery maneuver involving Jumping and Strafing (Left/Right). Executing this maneuver while on a ladder may force the bot to jump off or detach immediately. This hasn't been confirmed as a cause but the behavior looks really similar to standard OnStuck behavior.

  4. Aim Focus Distractions - While climbing, the bot's behavior systems UpdateLookingAroundForEnemies might remain active, interrupting the bot when climbing a ladder and effectively disarming the bot mid-climb.

  5. ??? - There may be other factors preventing the bots from climbing ladders.

To Reproduce

  • Load a map with vertical ladders, such as ntre_dawn_ctg.
  • Spawn a friendly bot (e.g., neo_bot_add 1).
  • Order the bot (via command system implemented in Bots follow you and your pings when you press +use on them #1345) to navigate to a destination that requires climbing a ladder (e.g., from the foot of the ladder to a platform above).
  • Observe the bot's behavior when it reaches the ladder.

Expected behavior

The bot should attach to the ladder and climb steadily to the NavArea at the top, maintaining a view angle roughly aligned with the ladder's ascent direction.

Actual behavior

The bots spin around, strafe, and jump at the bottom of the ladder.

Operating System

  • Windows
  • Linux

Version/Distro

Windows 11

Machine's CPU

No response

Machine's GPU

No response

GPU's driver

No response

Build's compiler

No response

Additional context and Screenshots

No response

Metadata

Metadata

Assignees

Labels

Bug ReportBug Reports made through the "Report Issue" interface in GitHub.

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions