| 133 | } |
| 134 | |
| 135 | static Vector3 GetBoxCenter(int boxIndex) |
| 136 | { |
| 137 | if (boxIndex <= NO_VALUE || boxIndex >= g_Level.PathfindingBoxes.size()) |
| 138 | return Vector3::Zero; |
| 139 | |
| 140 | auto& currBox = g_Level.PathfindingBoxes[boxIndex]; |
| 141 | |
| 142 | float x = ((float)currBox.left + (float)(currBox.right - currBox.left) / 2.0f) * BLOCK(1); |
| 143 | auto y = currBox.height - CLICK(1); |
| 144 | float z = ((float)currBox.top + (float)(currBox.bottom - currBox.top) / 2.0f) * BLOCK(1); |
| 145 | |
| 146 | return Vector3(z, y, x); |
| 147 | } |
| 148 | |
| 149 | static void DrawBox(int boxIndex, const Vector3& color) |
| 150 | { |
no test coverage detected