| 156 | } |
| 157 | |
| 158 | void CLevelGraph::draw_stalkers(const int& vertex_id) |
| 159 | { |
| 160 | if (!ai().get_alife()) |
| 161 | return; |
| 162 | |
| 163 | const float radius = .0105f; |
| 164 | const u32 color = D3DCOLOR_XRGB(255, 0, 0); |
| 165 | const CGameGraph& graph = ai().game_graph(); |
| 166 | CGameFont& font = *HUD().Font().pFontDI; |
| 167 | Fvector position = convert_position(graph.vertex(vertex_id)->game_point()); |
| 168 | |
| 169 | font.SetColor(D3DCOLOR_XRGB(255, 255, 0)); |
| 170 | |
| 171 | bool show_text = true; |
| 172 | for (;;) |
| 173 | { |
| 174 | Fvector4 temp; |
| 175 | Device.mFullTransform.transform(temp, position); |
| 176 | font.OutSetI(temp.x, -temp.y); |
| 177 | font.SetHeightI(.05f / _sqrt(temp.w)); |
| 178 | |
| 179 | if (temp.z < 0.f) |
| 180 | { |
| 181 | show_text = false; |
| 182 | break; |
| 183 | } |
| 184 | |
| 185 | if (temp.w < 0.f) |
| 186 | { |
| 187 | show_text = false; |
| 188 | break; |
| 189 | } |
| 190 | |
| 191 | if (temp.x < -1.f) |
| 192 | { |
| 193 | show_text = false; |
| 194 | break; |
| 195 | } |
| 196 | |
| 197 | if (temp.x > 1.f) |
| 198 | { |
| 199 | show_text = false; |
| 200 | break; |
| 201 | } |
| 202 | |
| 203 | if (temp.y < -1.f) |
| 204 | { |
| 205 | show_text = false; |
| 206 | break; |
| 207 | } |
| 208 | |
| 209 | if (temp.x > 1.f) |
| 210 | { |
| 211 | show_text = false; |
| 212 | break; |
| 213 | } |
| 214 | |
| 215 | break; |
nothing calls this directly
no test coverage detected