MCPcopy Create free account
hub / github.com/assaultcube/AC / CurrentWPIsValid

Method CurrentWPIsValid

source/src/bot/bot_waypoint.cpp:2709–2730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2707}
2708
2709bool CBot::CurrentWPIsValid()
2710{
2711 if (!m_pCurrentWaypoint)
2712 {
2713 //condebug("Invalid WP: Is NULL");
2714 return false;
2715 }
2716
2717 // check if the bot has been trying to get to this waypoint for a while...
2718 if ((m_iWaypointTime + 5000) < lastmillis)
2719 {
2720 condebug("Invalid WP: time over");
2721 return false;
2722 }
2723
2724#ifndef RELEASE_BUILD
2725 if (!IsVisible(m_pCurrentWaypoint->pNode->v_origin))
2726 condebug("Invalid WP: Not visible");
2727#endif
2728
2729 return (IsVisible(m_pCurrentWaypoint->pNode->v_origin));
2730}
2731
2732bool CBot::ReachedGoalWP()
2733{

Callers

nothing calls this directly

Calls 2

condebugFunction · 0.85
IsVisibleFunction · 0.85

Tested by

no test coverage detected