NavPlan function ( MapBotBase arg0 ) { Entity loc0 = arg0 . kb . getRandomItem ( ) ; int loc1 = ( int ) ( 80 * PLAN_TIME_PER_DIST ) ; NavPlan loc2 = new NavPlan ( arg0 , loc0 , loc1 ) ; loc2 . path = new Waypoint [ 1 ] ; loc2 . path [ 0 ] = new Waypoint ( loc0 . getObjectPosition ( ) ) ; loc2 . isSpontaneos = true ; return loc2 ; }
if the bot is stuck it may need the spontaneous plan in some random direction in order to move it out from the stuck position , get again close to it 's known waypoints and be able to find a new plan . concode_field_sep double PLAN_TIME_PER_DIST concode_elem_sep int maximalDistance concode_field_sep double getDistanceFollowingMap concode_elem_sep NavPlan establishNewPlan concode_elem_sep NavPlan getSpontaneousPlan