Could you check when the bot is on the ladder if the movetype is MOVETYPE_FLY?
Code:
pEdict->v.movetype == MOVETYPE_FLY
Also I see in EPB that there is special code that handles ladder approaching
Code:
if (paths[pBot->curr_wpt_index]->flags & W_FL_LADDER)
{
if (pBot->wpt_origin.z < pEdict->v.origin.z)
{
if ((pEdict->v.movetype != MOVETYPE_FLY) &&
(pEdict->v.flags & FL_ONGROUND) && !bIsDucking)
{
// Slowly approach ladder if going down
pBot->f_move_speed = wpt_distance;
if (pBot->f_move_speed < 150.0)
pBot->f_move_speed = 150.0;
else if (pBot->f_move_speed > pEdict->v.maxspeed)
pBot->f_move_speed = pEdict->v.maxspeed;
}
}
}