Notify all bots of a deleted waypoint
| 390 | |
| 391 | // Notify all bots of a deleted waypoint |
| 392 | void 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 | |
| 422 | void CBotManager::MakeBotFileName(const char *szFileName, const char *szDir1, const char *szDir2, char *szOutput) |
| 423 | { |
no test coverage detected