Thread: Recast / Detour
View Single Post
Re: Recast / Detour
Old
  (#36)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,618
Join Date: Jul 2004
Location: Bulgaria
Default Re: Recast / Detour - 29-08-2015

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;
            }
        }
    }
  
Reply With Quote