as far as I'm aware botman never implemented any non-waypoint navigation code except for very basic waypointless navigation, unless I'm mistaken.
What PMB and I did for RACC bot and RCBot respectively was to take several tracelines across the bots field of view and choose to go down the path which had the longest distance to any wall. It's a basic technique used in carpet cleaning bots and in webots for example.
From my own understanding, this function that you've shown, doesn't do anything useful for bots to avoid falling.
Imagine this scenario
BotChecFloor() = true : okay move forward
BotChecFloor() = true : okay move forward
BotChecFloor() = true : okay move forward
BotChecFloor() = true : okay move forward
(bot has already fallen off floor now)
BotChecFloor() = false: okay turn or stop
(bot is falling and can't turn or stop)
(bot dies)
as you can see BotChecFloor will return true even if the bot is eventually going to fall, so it's not a useful function for this. you need to check the floor in front of the bot not directly below the bot.
example
Code:
BOOL CBot::BotChecFloor( void )
{
Vector v_src, v_fwd;
TraceResult tr;
v_src = pev->origin;
v_fwd = pev->velocity;
v_fwd.z = v_fwd.z - 50.0f;
UTIL_TraceLine( v_src, v_fwd, dont_ignore_monsters, ENT(pev), &tr);
// check if the trace hit something...
if (tr.flFraction < 1.0)
{
if (f_wall_down = 1)
f_wall_down = gpGlobals->time;
return TRUE;
}
return FALSE;
}
this code will do this:
Code:
O -.
/|\ `.
/\ `.______
the previous code did this
Code:
O
/|\
/\
.
.
.
____