| 481 | } |
| 482 | |
| 483 | std::vector<FloorInfo*> GetNeighborSectors(const Vector3i& pos, int roomNumber, unsigned int searchDepth) |
| 484 | { |
| 485 | auto sectors = std::vector<FloorInfo*>{}; |
| 486 | |
| 487 | // Run through neighbor rooms. |
| 488 | auto& room = g_Level.Rooms[roomNumber]; |
| 489 | for (int neighborRoomNumber : room.NeighborRoomNumbers) |
| 490 | { |
| 491 | // Collect neighbor sectors. |
| 492 | auto roomGridCoords = GetNeighborRoomGridCoords(pos, neighborRoomNumber, searchDepth); |
| 493 | for (const auto& roomGridCoord : roomGridCoords) |
| 494 | sectors.push_back(&GetFloor(neighborRoomNumber, roomGridCoord)); |
| 495 | } |
| 496 | |
| 497 | // Return neighbor sectors. |
| 498 | return sectors; |
| 499 | } |
| 500 | |
| 501 | FloorInfo& GetFloor(int roomNumber, const Vector2i& roomGridCoord) |
| 502 | { |
no test coverage detected