| 78 | } |
| 79 | |
| 80 | void NavmeshHintObject::Draw() { |
| 81 | if (g_debug_runtime_disable_navmesh_hint_object_draw) { |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | // Check if we should be drawn. |
| 86 | if (scenegraph_->map_editor->state_ == MapEditor::kInGame || Graphics::Instance()->media_mode() || ActiveCameras::Instance()->Get()->GetFlags() == Camera::kPreviewCamera) { |
| 87 | } else if (this->editor_visible) { |
| 88 | if (!unit_box_vbo->valid()) { |
| 89 | unit_box_vbo->Fill( |
| 90 | kVBOStatic | kVBOFloat, |
| 91 | cross_marking.size() * sizeof(vec3), |
| 92 | &cross_marking[0]); |
| 93 | } |
| 94 | vec4 draw_color(box_color); |
| 95 | draw_color[3] *= selected_ ? 1.0f : 0.2f; |
| 96 | DebugDraw::Instance()->AddLineObject(unit_box_vbo, GetTransform(), draw_color, _delete_on_draw); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | void NavmeshHintObject::GetDesc(EntityDescription& desc) const { |
| 101 | Object::GetDesc(desc); |
nothing calls this directly
no test coverage detected