| 954 | void draw_visiblity_rays(CCustomMonster* self, const CObject* object, collide::rq_results& rq_storage); |
| 955 | |
| 956 | void CCustomMonster::OnRender() |
| 957 | { |
| 958 | RCache.OnFrameEnd(); |
| 959 | |
| 960 | for (int i = 0; i < 1; ++i) |
| 961 | { |
| 962 | const xr_vector<CDetailPathManager::STravelPoint>& keys = !i ? movement().detail().m_key_points : movement().detail().m_key_points; |
| 963 | const xr_vector<DetailPathManager::STravelPathPoint>& path = !i ? movement().detail().path() : movement().detail().path(); |
| 964 | u32 color0 = !i ? D3DCOLOR_XRGB(0, 255, 0) : D3DCOLOR_XRGB(0, 0, 255); |
| 965 | u32 color1 = !i ? D3DCOLOR_XRGB(255, 0, 0) : D3DCOLOR_XRGB(255, 255, 0); |
| 966 | u32 color2 = !i ? D3DCOLOR_XRGB(0, 0, 255) : D3DCOLOR_XRGB(0, 255, 255); |
| 967 | u32 color3 = !i ? D3DCOLOR_XRGB(255, 255, 255) : D3DCOLOR_XRGB(255, 0, 255); |
| 968 | float radius0 = !i ? .1f : .15f; |
| 969 | float radius1 = !i ? .2f : .3f; |
| 970 | { |
| 971 | for (u32 I = 1; I < path.size(); ++I) |
| 972 | { |
| 973 | const DetailPathManager::STravelPathPoint& N1 = path[I - 1]; |
| 974 | Fvector P1; |
| 975 | P1.set(N1.position); |
| 976 | P1.y += 0.1f; |
| 977 | const DetailPathManager::STravelPathPoint& N2 = path[I]; |
| 978 | Fvector P2; |
| 979 | P2.set(N2.position); |
| 980 | P2.y += 0.1f; |
| 981 | if (!fis_zero(P1.distance_to_sqr(P2), EPS_L)) |
| 982 | Level().debug_renderer().draw_line(Fidentity, P1, P2, color0); |
| 983 | if ((path.size() - 1) == I) // песледний box? |
| 984 | Level().debug_renderer().draw_aabb(P1, radius0, radius0, radius0, color1); |
| 985 | else |
| 986 | Level().debug_renderer().draw_aabb(P1, radius0, radius0, radius0, color2); |
| 987 | } |
| 988 | |
| 989 | for (u32 I = 1; I < keys.size(); ++I) |
| 990 | { |
| 991 | CDetailPathManager::STravelPoint temp; |
| 992 | temp = keys[I - 1]; |
| 993 | Fvector P1; |
| 994 | P1.set(temp.position.x, ai().level_graph().vertex_plane_y(temp.vertex_id), temp.position.y); |
| 995 | P1.y += 0.1f; |
| 996 | |
| 997 | temp = keys[I]; |
| 998 | Fvector P2; |
| 999 | P2.set(temp.position.x, ai().level_graph().vertex_plane_y(temp.vertex_id), temp.position.y); |
| 1000 | P2.y += 0.1f; |
| 1001 | |
| 1002 | if (!fis_zero(P1.distance_to_sqr(P2), EPS_L)) |
| 1003 | Level().debug_renderer().draw_line(Fidentity, P1, P2, color1); |
| 1004 | Level().debug_renderer().draw_aabb(P1, radius1, radius1, radius1, color3); |
| 1005 | } |
| 1006 | } |
| 1007 | } |
| 1008 | { |
| 1009 | u32 node = movement().level_dest_vertex_id(); |
| 1010 | if (node == u32(-1)) |
| 1011 | node = 0; |
| 1012 | |
| 1013 | Fvector P1 = ai().level_graph().vertex_position(node); |
nothing calls this directly
no test coverage detected