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

Method DelWaypoint

source/src/bot/botmanager.cpp:392–420  ·  view source on GitHub ↗

Notify all bots of a deleted waypoint

Source from the content-addressed store, hash-verified

390
391// Notify all bots of a deleted waypoint
392void CBotManager::DelWaypoint(node_s *pNode)
393{
394 if (bots.length())
395 {
396 short x, y;
397 TLinkedList<waypoint_s *>::node_s *p;
398
399 loopv(bots)
400 {
401 if (!bots[i] || !bots[i]->pBot) continue;
402
403 WaypointClass.GetNodeIndexes(pNode->v_origin, &x, &y);
404 p = bots[i]->pBot->m_WaypointList[x][y].GetFirst();
405
406 while(p)
407 {
408 if (p->Entry->pNode == pNode)
409 {
410 delete p->Entry;
411 bots[i]->pBot->m_WaypointList[x][y].DeleteNode(p);
412 break;
413 }
414 p = p->next;
415 }
416 }
417 }
418
419 CalculateMaxAStarCount();
420}
421
422void CBotManager::MakeBotFileName(const char *szFileName, const char *szDir1, const char *szDir2, char *szOutput)
423{

Callers 3

ClearMethod · 0.80
DeleteWaypointMethod · 0.80
FloodThinkMethod · 0.80

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected