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

Method GoToDebugGoal

source/src/bot/bot_waypoint.cpp:3014–3032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3012}
3013
3014void CBot::GoToDebugGoal(vec o)
3015{
3016 ResetWaypointVars();
3017
3018 node_s *wp = WaypointClass.GetNearestWaypoint(m_pMyEnt, 20.0f);
3019 node_s *goalwp = WaypointClass.GetNearestWaypoint(player1, 20.0f);
3020
3021 if (!wp || !goalwp)
3022 {
3023 wp = WaypointClass.GetNearestFloodWP(m_pMyEnt, 8.0f);
3024 goalwp = WaypointClass.GetNearestFloodWP(player1, 5.0f);
3025 }
3026 if (!wp || !goalwp) { condebug("No near WP"); return; }
3027
3028 SetCurrentWaypoint(wp);
3029 SetCurrentGoalWaypoint(goalwp);
3030 m_vGoal = o;
3031 m_bGoToDebugGoal = true;
3032}
3033#endif
3034
3035// Bot class end

Callers 1

loopvFunction · 0.80

Calls 3

condebugFunction · 0.85
GetNearestWaypointMethod · 0.45
GetNearestFloodWPMethod · 0.45

Tested by

no test coverage detected